Quantcast
Channel: Questions in topic: "stay"
Viewing all articles
Browse latest Browse all 18

Not Quite Sure How OnCollision... Works

$
0
0
I've been having trouble with this for a long, long time. I can't seem to get this code to work, no matter what I try. var player : GameObject; var apexHeight : int; var normalHeight : int; var onTop : boolean; function Start(){ player = GameObject.Find("Player"); } function OnCollisionStay (collisionInfo : Collision) { if(collisionInfo == Collision.player) rigidbody.AddForce(Vector3.up * 50); }

Viewing all articles
Browse latest Browse all 18

Trending Articles



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