Jump to content

Simulate hoverboard movement


Batzi
 Share

Recommended Posts

Hey guys! Hope you are doing well!

 

So I have a sprite of a guy on a hoverboard. I am trying to simulate a hoverboard movement so that everytime he moves, it goes up and down as it moves towards the target.

 

I am trying to simulate something close to this:

 

 tumblr_m3vt4pPWcX1qec398o1_500.gif

 

Now this is going back and forth but I'd like it to go up and down instead.

 

How would you implement it? Would you use gravity?

Link to comment
Share on other sites

I would use a patterned function like sin or cos to get a slight deltaY to add to the player's y coord each frame. :)

when you say player's y coord you mean the player's position on the y-axis and not the velocity right?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...