Help With Collision

I’m learning how to use Defold, and am currently working on collision. I copied the “naive” code from: https://www.defold.com/manuals/physics/ and it worked! However, when I copy the “full implementation”, it doesn’t work. At first, I got an error about self.correction being a nil value (it wasn’t included in the code), so I declared it as an empty vmath.vector3. However, when I do that and move my character to the collision, it just kinda freaks out. I’m still pretty new to Defold (and not that good at math), so if I left out anything, let me know!

1 Like

Hi @JustAPotota54!

The “Full” implementation is actually a snippet from our Platformer tutorial. It will explain the missing variables in detail. By the sounds of it, I wonder if you forget to reset the correction variable after each update? (see the code)

1 Like