What expression goes up the -Y axis in Add a force?

Hello,
What about an expression that makes the player go up when they are going down? I’m making an event with a minus in front of speed, which is stupid.

Not really. The Y axis goes positive in the down direction, and negative in the up direction. By using the minus sign, you are saying force is in an upward direction.

This axis alignment will be historical, most likely because of CRT displays, where the ray started at the top left finished at the bottom right, and incrementing it vertically meant moving the ray down the display.

1 Like

Agreed. It does seem counterintuitive but since the top-left corner is 0,0 then you would have to apply a negative force if the object was below 0,0. (by below I mean below on the screen or greater than zero)

You could apply force by direction if that works better for you. 270 degrees would always be up. 0 is right, 90 is down and 180 is left.

1 Like

Where do I put the minus?

Oh, I see, that works too

Before the object name, so it’s β€œ-PlayerCar.Variable(speed)”, or β€œ-Playercar.speed” (GDevelop works out it’s a variable).

1 Like