- Home /
Question by
NyeinChanAung · Oct 11, 2019 at 02:04 PM ·
colliderrigidbody2dphysics2d
Rotating child object in compound collider
I have two game objects, player and gun. Player has dynamic RigidBody 2D and gun has Box Collider 2D and set it as the child of Player. Here, Unity documentation says
When you create a compound collider like this, you should only use one Rigidbody component, placed on the root object in the hierarchy.
I have RigidBody 2D component in Parent and I want to rotate the gun, the child, but it has no RigidBody2D. I can't rotate with its transform component because it's under physics engine control. How can I rotate the child object in this case?
Comment
Your answer
Follow this Question
Related Questions
Drag Player Object using Physics 2D 0 Answers
Adding boundaries to restrict rigidbody2D movement 1 Answer
Unity 5: RigidBody or No RigidBody? 1 Answer