Steering An Airplane

Discussion in 'How Can I...?' started by Niklas, Oct 29, 2020.

  1. Niklas

    Niklas Boxer

    Joined:
    Jul 5, 2020
    Messages:
    5
    Likes Received:
    1
    Hello!

    Im trying to make an airplane move freely with 6 buttons but have come to a problem.
    2 buttons for up and down.
    2 buttons for turning left and right.
    2 buttons for rotate left and right as a barrel roll.

    I can move up and down no matter which direction I am facing, the controls is always following the airplanes path. If I am upside down and push UP button I go down as I want.
    But the problem comes with rotating and turning, instead of steering from the airplanes point of view it steers towards the axis with the grid.

    I have "movement node" for all 6 buttons. The movement node for turning up and down is "X 70" and "X -70" and for the turning and rotation I use the Z and Y.

    Why is it the X axis works from the airplanes point of view and follow its rotation but the Z and Y goes towards the Z and Y axis of the game world.

    Please help me / Niklas
     
  2. Josh (Nology Games)

    Josh (Nology Games) Avid Boxer

    Joined:
    Nov 27, 2017
    Messages:
    200
    Likes Received:
    155
    If it’s just for the barrel roll fracture, you could use a rotation animation note instead. It could perform the full barrel roll. If you want to have it so you can pull up from any angle of rotation, it might be a little trickier but definitely possible.
     
  3. Niklas

    Niklas Boxer

    Joined:
    Jul 5, 2020
    Messages:
    5
    Likes Received:
    1
    Thanks for the answer.
    It's not for just the animation, I want to have full control of the rotations, even if I'm going sideways. But since the movement node reacts to where I am facing on the axis a sideway rotation transforms to a loop gradually the more I'm facing towards the x-axis. If you understand what I mean. I guess a script in the node must be done to make; y-axis rotation to react and follow where the characters point of view of x,y and z axis are is instead of the worlds x,y and z- axis" which is out of my script knowledge.

    EDIT: I guess the simpler question is, how can I make my flying objects orientation turn with local axis instead of the worlds x,y and z axis
     
    Last edited: Oct 30, 2020
  4. Hue Buildbox

    Hue Buildbox Administrator Staff Member

    Joined:
    May 11, 2017
    Messages:
    459
    Likes Received:
    210
    Hi Niklas,
    Can you send the bbdoc to me at support@buildbox.com, so I can take a look at this for you? Place 'Hue' in the subject line.
     
  5. Niklas

    Niklas Boxer

    Joined:
    Jul 5, 2020
    Messages:
    5
    Likes Received:
    1
    Hello Hue. I have sent the bbdoc to you now. Thank you for replying and trying to help!
     
    Hue Buildbox likes this.
  6. Niklas

    Niklas Boxer

    Joined:
    Jul 5, 2020
    Messages:
    5
    Likes Received:
    1
    My problem is still unsolved. Is there anyone that can help/script a rotation node to work with the character as the center of "movement rotation node" instead of the worlds axis. Here is a video of the problem.


    Thanks!
     

Share This Page