- Home /
How does object shape influence its collision?
I created a simple 3d arrow (a box deformed from one side) and imported it to unity. Then I added a rigidbody and a sphere collider to it.
When the sphere contains the arrow inside it, the arrow interacts with terrain like the sphere, which is ok.
But when the sphere is inside the mesh, it just falls to the ground without any rotation afterwards.
1)I have no idea what does collider mean, as the unity script reference defines it as "A base class of all colliders". I thought it is some kind of hitbox, but my object's behavior in the second case, shows that I was wrong.
2)Besides, without adding a rigidbody the physics does nothing. So, it should somehow interact with the collider. Is it explained somewhere?
3)I need to specify a sub-object to my arrow which collision can easily be calculated by the engine. How can I do it?
Answer by Ashish Dwivedi · Feb 12, 2014 at 11:56 AM
Add physics material to your sphere collider and check behaviour of your collider be changing the values of physics material. Add rigidbody to sphere and set drag , angular drag etc and keep checking then you will absolutely find how the shape influences the collision.
Then, I'll check how the physic values influence the collision. $$anonymous$$y problem is that my mesh receives collision by parts, where there are no colliders.
this collides like an arrow, not like a spere, regardless of material and rigidody type. And I can't what settings are responsible for it
$$anonymous$$ake sure there is no other collider on arrow except sphere collider. Is your arrow is made by using parent and child? If yes then check the collider on all the child object and as well as parent. If not then can you show me only inspector snapshot?
As I can see, there are no other colliders.I'm trying to upload the project to filedropper, but it takes time.
$$anonymous$$y error. Actually it didn't collide like an arrow. Thanks a lot.
Answer by RedLord · Feb 13, 2014 at 12:16 PM
I forgot that the engine uses quite approximate physics models. The sphere falling from the height got no angular velocity, so it looked like a fall of a box.
Answer by KuPAfoo · Feb 13, 2014 at 09:59 AM
Rigidbody reacts to physics
Colliders are for registering another collider has collided with the primary collider
A lot of times you will need a rigidbody and collider on the same object.
Your answer
Follow this Question
Related Questions
Rigidbodys 0 Answers
Sprite does not rotate with a CircleCollider2D 1 Answer
Collision Problem 1 Answer
collision child with rigidbody in parent 0 Answers
OnCollisionEnter but have colliding object not move the object it collides with 1 Answer