Contraining Rotors to Chinook Helicopter HELP PLEASE!!

battleduckbattleduck Member Posts: 105
edited May 2012 in Working with GS (Mac)
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!!

Best Answer

Answers

  • simo103simo103 Member, PRO Posts: 1,331
    any reason the blades and helicopter body aren't all one actor and then animated?
  • battleduckbattleduck Member Posts: 105
    Hi simo, yes & no. In reality i guess not, but when i started all this i choose this method, as i was able to achieve a really nice simulation of the rotors spooling up and winding down, by interpolating the angular velocity with an ease in or out.
  • battleduckbattleduck Member Posts: 105
    Cheers @RThurman, that is truly awesome, just what i needed. If later on in things performance is taking a hit and i need to optimise, i may well resort to animation, but this is great.
    Thanks a bunch for the Demo!!!
    BD :)
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Glad its working for you!

    RThurman
Sign In or Register to comment.