Hello!
I’m trying to create a character in a 3d scene that can move forwards / backwards as well as jump / fall. I’m having this strange behavior where the character will periodically have a larger gravity value than usual (see video below).
It seems like ever 122 updates (at 60 fps) the check for ground collision fails, resulting in the character falling for 1 frame, resulting in a strange pulse like animation. This is caught the next frame and the character returns to expected functionality for 122 updates.
I’ve tried everything I can think of to fix it:
- Lowering the frame rate to 30 results in this happening every 63 frames.
- Changing the value of gravity has no effect.
- Changing physical scale doesn’t prevent this from happening.
- If I remove player input this still happens.
- Happens with both vsync on and off.
- Happens in both fixed_update and update loop
- Happens when physics “used fixed time stamp” is both on and off
- Tried changing the collision shape
I am using a lot of code from Dragosha’s light and shadow example, but I do not think that is related: GitHub - Dragosha/defold-light-and-shadows: Pack of shaders to make light and shadows in Defold.
Any ideas for what can fix this?