+1 vote

Does anyone have an idea as to how to do this in godot?

here is an example of what i mean
https://youtu.be/HBswql-rS7I?t=2m12s

also
https://youtu.be/2PRFSPWmneE?t=55m2s

in Engine by (100 points)

This might be related as feature requests go:
https://github.com/godotengine/godot/issues/10321

2 Answers

+1 vote

The jump can be faked by a height variable you can control, depending the design the value can just affect the sprite position and change the collision control to a special state.

While jumping, it should ignore all collision of objects in a level, and start colliding with another level at specific height value if apply, collision body may need to adjust position when stepping on another level.


The way you plan to design the levels will affect the method used for jumping and vice versa, try to make the jumping simple even if levels get too blocky because it may be better for the player.

by (7,934 points)
0 votes

Now, this might NOT be a valid solution, but you can just alter the height of the SPRITE itself by using the AnimationPlayer node. Goes like this:

  • Trigger a frame
  • Go higher
  • Trigger a frame
  • Go higher
  • Trigger a frame
  • Go higher
  • Trigger a frame
  • Go lower
  • Trigger a frame
  • Go lower
  • Trigger a frame
  • Go lower

This is, currently, the only way to have the Y act as an UP and DOWN and have JUMP at the same time.

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.