- Home /
Object spins out of control
When I move my object called gun into another object called wall and they collide gun spins out of control into space. Both objects have box colliders and rigid body's.
I would like for wall to act as a barrier so gun can not move out of bounds, and it dose but the spinning wildly into space is not a desired effect. Also I have tried freezing the rotation on the rigid body but then it just goes in a random direction on the x,y,z axis. Freezing position did not work either.
Thanks in advanced
So you've got a collider on the CHILD of your object, but not on the PARENT?
Normally you'd do that the other-way around - just make the parent objects collider large enough so that it also covers the gun.
So your capsule, sphere or box colliders would be big enough to fit the parent AND child. Then there isn't a problem.
Parent of what child, do you mean the gun. If so I have put a collider on the gun and then a collider on the parent pf the gun that is bigger than the guns collider, still spins out of countrol wildly
Answer by ninjaboynaru · Nov 12, 2012 at 04:04 PM
Thanks for trying to help. I got the solution.
I removed the rigid body from the wall so it only had a box collider and the gun had a collider and a rigid body. When they collided nothing when flying into space.
This is probably why only the player should have a rigid body and not the scenery.
Your answer
Follow this Question
Related Questions
Object Carry 0 Answers
how to check if one object is colliding with another 1 Answer
Enable objects to enter the trigger 2 Answers
problem with collider 1 Answer
Script to move an objects position and rotation upon collision with player? 1 Answer