Reputation: 57
My 'player' keeps falling through a plane/cube (GameObject). I want the player to rest on a invisible plane/cube before the user starts to play the game, so the game does not start without user interaction. I've searched everywhere and have not found a proper solution. However, every time I try to get the player to rest on the object is falls right through.
Upvotes: 0
Views: 3815
Reputation: 121
You have to disable"isTrigger", i.e., set it to false. Objects that have isTrigger turned on would not act as a real world physical body when it comes to collision, though it sends collision messages.
Upvotes: 3
Reputation: 1
Are you developing the project for 2D or 3D? You should make sure that both object has the same kind of collider type (2D or 3D) in order to function properly. Also check the size of the colliders by pressing "edit collider" in order to check the actual collision box. I know myself that I've made the mistake of increasing the size of an object after adding a collider which in some cases has resulted in the collider not increasing in size.
Best of luck!
Upvotes: 0
Reputation: 861
Your plane/cube that is acting as the ground needs to have a collider on it and no rigidbody. Your object that is resting on the ground should have a collider on it as well as a rigidbody.
Upvotes: 1