This site requires JavaScript, please enable it in your browser!
Greenfoot back
TillaB13
TillaB13 wrote ...

2024/1/10

Jumping and falling with angels

TillaB13 TillaB13

2024/1/10

#
I am trying to make a ball jump and fall, while being able to move left and right in the air. I can get it to go up and down smoothly, but I cant figure out how to set the angle properly to move at an angle in the air. I am trying to use the inverse tangent of the movement and the vertical falling component to find the angle, but due to greenfoot being positive x orianted and clockwise, I cannot figure out how to convert the inverse tangent angle to the proper angle needed for the movement. I am new to greenfoot as Im using it for a coding project for school. Any help woyuld be greatly apreciated.
Super_Hippo Super_Hippo

2024/1/10

#
It might be easier to calculate the new X and Y separately without using the angle.
You need to login to post a reply.