Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Serenade | |
Old Version | Published before Godot 3 was released. |
Hey!
I made player and enemy object as Kinematic2D bodies, when player jumps and stands on enemy, it shakes, sometimes a bit, sometimes, it shakes quite a lot, though both of them are standing perfectly still…
How can i fix this?
Here is how my physics code looks like (in idea) …
var gravity = 1000
var vel = Vector2()
...
func _fixed_process(delta):
var force = Vector2(0,gravity)
...
vel += force * delta
var motion =vel*delta
motion = move(motion)
I also used clamp to fix falling speed, where it doesnt go higher then 100~, but without it, it still twitches…