Page 1 of 1

Object-oriented physics don't work

Posted: Mon Mar 03, 2014 8:27 am
by LoneArtisan
Nil

Re: Object-oriented physics don't work

Posted: Mon Mar 03, 2014 8:57 am
by Azhukar
You're drawing your world wrong, see my attachment for what is actually happening.

You're also creating your circle shape with non-zero offset, which is probably what caused the confusion. Line 16 in circle.lua should be:

Code: Select all

self.shape = lp.newCircleShape(0,0, self.radius)
I've only added "debugWorldDraw" to main.lua and called it in love.draw. Rest of your code is untouched except for enabling mouse cursor / disabling borderless for my convenience.