Player Ship Collisions

Hi,

I was wondering if in UnityScript, there is a way to tell if an object is touching another object. Also, is there a way to say, if that is true, you can’t move. I’m making a mine lander style game, so I need to know when my ship is touching another collision mesh.

Thank You,

koramere

It sounds like you want to be using the physics which will handle a lot of this stuff for you!

If you have a rigidbody and a collider attached to your surface and your space ship then it will stop the ship from going through the surface: you can also detect a collision by writing a function OnCollisionEnter(collision : Collision)