- Home /
[SOLVED] Rotating child objects fix
I have a problem, i am rotating gameobject which is flashlight, it's empty gameobject which is parent for actual flashlight parts, like flashlight model, spotlight and light cone. The problem is that these child objects are not rotating as they should. Just look at this: http://i.imgur.com/OeDhLkQ.png How to fix that?
EDIT: Actually i am rotating a bone (arm) with flashlight object attached to it.
what object attached to arm bone? flashlight model or "empty gameobject which is parent for actual flashlight parts, like flashlight model, spotlight and light cone"?
parent empty gameobject. I've tried just attaching its parts ins$$anonymous$$d of parent gameobject but it's no difference
how do you attach it? do you make your flashlight (you parent object) a child of bone, or somehow else?
Just child of bone. It's not the first time i am having this problem. Last time i was trying to make digital camera with render texture on it. I've used parent gameobject with 2 child objects: Camera model and render texture plane. When i was rotating its parent it was the same - child objects were not rotating as they should. However it works fine if i just rotate parent gameobjects, it's getting bad only if i am rotating it using a bone + parent gameobject attached to it. SO it works when it rotates in place, not when it's orbiting rotate.
So you have your parent empty game object, with the flashlight and spotlight being children of it?
Try making the spotlight a child of the flashlight model and make the flashlight model a child of the empty game object.
Your answer
Follow this Question
Related Questions
Make a simple tree 1 Answer
Make gameobject a child without affecting scale? 1 Answer
Child versus Parent rotations 3 Answers
force child rotation to zero? 2 Answers