Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

rigidbody.AddForce to another object

$
0
0
I want my "Jumper" object, to access the Rigidbody on my Player. And add a force to that. Searched for hours to find answers on google. but nothing. Followed all guides i could find. I got this: #pragma strict var thePlayer : GameObject; var jumpForce : int; function Start () { } function OnTriggerEnter (other : Collider) { rigidbody.AddForce(Vector3.up * jumpForce); Debug.Log("Trigger Entered"); } But i dont know, how to target other objects, with rigidbody.

Viewing all articles
Browse latest Browse all 1264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>