0
\$\begingroup\$

Fan physics

I have a platformer game and want to have fans in it that blow in a given direction and if the player presses the jump button they can go even further.

How do I do this?

side note:

I am working with godot engine

EDIT

My character moves on the two axes using two variables, both multiplied by speed: move_dir and y_velo. gravity affects y_velo and the arrow keys affect move_dir

\$\endgroup\$
  • 1
    \$\begingroup\$ There are different ways to handle object movement in Godot. Can you add more details about how you implemented your movement so far so we can suggest a solution which fits into what you have already done? \$\endgroup\$ – Philipp Apr 17 at 9:28
  • 1
    \$\begingroup\$ I would define either an Area2D or a Polygon2D which represents the area in which the fan affects objects. Then use a signal to detect when the player or any object enters the affected area and change it's velocity according to the air flow of the fan. \$\endgroup\$ – Ignatiamus Apr 20 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.