I’m very new to Defold and this forum!
I’m creating a project for school so I haven’t had a lot of time to deeply look into everything that Defold does. I’ve been struggling to understand the physics and I don’t want to copy and paste everything so I tried making my character jump using a for loop, and just changing the y-coordinates.
However this makes my character just move very fast as this value is changed very quickly, so I was wondering if there was any way to use the timer.delay() to increase the time taken between the y coordinate being changed? Here is my code
if pos.y == 84 then if isJump == true then y_coordinate = 84 repeat y_coordinate = y_coordinate + 1 pos.y = y_coordinate go.set_position(pos) timer.delay(1, false) until y_coordinate == 200 end end
This does make my character “Jump”, but as it is so fast, trying to make the player come down again results in nothing.
I’ve tried reading the documentation but for some reason none of it makes sense to me.
If any help could be given that would be great