Contraining Rotors to Chinook Helicopter HELP PLEASE!!
![battleduck](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hi all, on one of my current projects the player can run over to a helicopter, get in, take off and fly around.
I have a few different helicopters, which can move forward, backward, strafe left, strafe right, and rotate either CW or CCW.
For these normal single rotor helicopters, it's simply a case of ensuring that the anchor point on the helicopter body actor is in the centre of the actor (leaving some extra transparent space to accomplish this) and then constraining the rotor blades actor (again ensuring the graphic is correctly centred) to he helicopters X & Y position.Viola, all working fine.
My problem arises when trying to add a Chinook helicopter to my game ( for those that don't know it has two sets of rotor blades that rotate in opposite directions, 1 at the front & 1 at the rear)
When sat on the ground everything looks great, but when flying i have to problems:
PROBLEM1:
-To imitate take off / landing, I interpolate the camera size to zoom and then interpolate the helicopter & rotor size to enlarge, whilst making the ground seem further away.
-because the 2 sets of rotors are off centre, they are constrained to the heliX & HeliY+offset now when i take off, the blades appear too close together, so i some how need to interpolate the offset value to match the new positions.
PROBLEM2:
-This is the main issue!!!
-whilst flying, the above constraint technique works fine all the time the chinooks orientation remains the same
i.e, if moving straight forward, back or strafing left/right, the rotors appear in the correct position.
-HOWEVER, if i then rotate the chinook CW or CWW, the rotors don't track the X&Y as i want ,and appear to be displaced, so that they only line-up correctly if the heli is pointing due north!
Please can some one help me with this problem, as i would really like to add this iconic helicopter to my game.
Sorry for such a long question, but i felt it best if i could get down as much detail as possible for you guys to help out.
Many Thanks
BD
EDIT:
I've just solved PROBLEM 1: (amazing why writing something down can do to clarify things)
I added a self attribute (integer) to the roots blades, and constrained the Ypos to HeliY+/-self.Offset
I can now interpolate this offset number at will, and achieve the effect I'm after.
Now just PROBLEM 2 to get sorted!!
I have a few different helicopters, which can move forward, backward, strafe left, strafe right, and rotate either CW or CCW.
For these normal single rotor helicopters, it's simply a case of ensuring that the anchor point on the helicopter body actor is in the centre of the actor (leaving some extra transparent space to accomplish this) and then constraining the rotor blades actor (again ensuring the graphic is correctly centred) to he helicopters X & Y position.Viola, all working fine.
My problem arises when trying to add a Chinook helicopter to my game ( for those that don't know it has two sets of rotor blades that rotate in opposite directions, 1 at the front & 1 at the rear)
When sat on the ground everything looks great, but when flying i have to problems:
PROBLEM1:
-To imitate take off / landing, I interpolate the camera size to zoom and then interpolate the helicopter & rotor size to enlarge, whilst making the ground seem further away.
-because the 2 sets of rotors are off centre, they are constrained to the heliX & HeliY+offset now when i take off, the blades appear too close together, so i some how need to interpolate the offset value to match the new positions.
PROBLEM2:
-This is the main issue!!!
-whilst flying, the above constraint technique works fine all the time the chinooks orientation remains the same
i.e, if moving straight forward, back or strafing left/right, the rotors appear in the correct position.
-HOWEVER, if i then rotate the chinook CW or CWW, the rotors don't track the X&Y as i want ,and appear to be displaced, so that they only line-up correctly if the heli is pointing due north!
Please can some one help me with this problem, as i would really like to add this iconic helicopter to my game.
Sorry for such a long question, but i felt it best if i could get down as much detail as possible for you guys to help out.
Many Thanks
BD
EDIT:
I've just solved PROBLEM 1: (amazing why writing something down can do to clarify things)
I added a self attribute (integer) to the roots blades, and constrained the Ypos to HeliY+/-self.Offset
I can now interpolate this offset number at will, and achieve the effect I'm after.
Now just PROBLEM 2 to get sorted!!
Best Answer
-
RThurman Posts: 2,881
@battleduck
I agree with @simo103 that this would be easiest with an animation. However, if you really want to constrain several rotors to the helicopter, here is a quick demo:
http://www.mediafire.com/download.php?bbr327g1neetb1x
Hope This helps!
RThurman
Answers
Thanks a bunch for the Demo!!!
BD
RThurman