|
Hi all, i would like to detect collision between the worm and my player. So if the player collide with the worm, it will fly away and deduct the BP. I have added rigidbody to my worm. And when i run my games, my worm drop infinitely out of the scene. Can i know why?? I am very sure that it is place properly on the terrain. So aren't very sure why it will drop infinitely. Please help.
(comments are locked)
|
|
Does your terrain have a collider component? It needs a collider for the physics engine to detect when a rigidbody has come into contact with it. Tip: if your terrain is flat, use a BoxCollider not a MeshCollider to save expensive computation. my terrain have a terrain collider. can it work? or i have to change to use box collider?? So i also have to set the iS trigger?
Mar 19 '12 at 01:06 AM
missypooh
Nope, you should be fine with a terrain collider. The problem might be with your worm's collider as aldonaletto mentioned. Try changing its collider to a box collider - they're the simplest kind of collider and will at least show you if it is a collider problem and not something else.
Mar 19 '12 at 06:58 AM
davedx
(comments are locked)
|

Check if the worm collider is set to trigger - with Is Trigger set, it will fall through the terrain. Another possibility: if the worm has a mesh collider, you must set Convex, or it will fall through the terrain.
yes. you are right, my worm has a mesh collider. Do i have to make any changes to the collision detection? And do i also have to add rigidbody to my player?