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\$
2
  • 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, 2019 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, 2019 at 7:43

0

You must log in to answer this question.

Browse other questions tagged .