Adopting parents animpos
Posted: Sat May 19, 2012 10:23 am
Hi,
I have a fighter plane's core that rotates around itself smoothly 360 degrees. Then I have smaller actors installed on it, engines and weapons and such. They have also 360 degrees rotation and the plane's core is their parent. It worked fine in first testings, the plane rotated 360 degrees and the pieces on board rotated around it so that it looked like they were physically sitting on it. I used the code line (in global code):
animpos = fighter_core.animpos;
for the pieces onboard.
The game mechanic anyway needs to support fleets of fighter planes so I changed that part of the code into:
animpos = parent.animpos;
Then I tested in game mode again but this time, the pieces don't move anymore with the plane! When I turn the nose left or right, the pieces just stay in the same position of the animation, making them just float in the air.
Question in short: How can I make the pieces follow their parent actors animpos?
Thank you
I have a fighter plane's core that rotates around itself smoothly 360 degrees. Then I have smaller actors installed on it, engines and weapons and such. They have also 360 degrees rotation and the plane's core is their parent. It worked fine in first testings, the plane rotated 360 degrees and the pieces on board rotated around it so that it looked like they were physically sitting on it. I used the code line (in global code):
animpos = fighter_core.animpos;
for the pieces onboard.
The game mechanic anyway needs to support fleets of fighter planes so I changed that part of the code into:
animpos = parent.animpos;
Then I tested in game mode again but this time, the pieces don't move anymore with the plane! When I turn the nose left or right, the pieces just stay in the same position of the animation, making them just float in the air.
Question in short: How can I make the pieces follow their parent actors animpos?
Thank you