Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Error when trying to get the angle of a body — Gideros Forum

Error when trying to get the angle of a body

KarrizKarriz Member
edited May 2013 in Bugs and issues
I'm making a physics-based game in which I need to know the direction the body is facing towards. Getting the value should be easy with b2.body:getAngle, but unfortunately I'm getting an error when trying to do so.

This is what I have: local angle = self.ball:getAngle()
And this is the error I get when trying to run my code: attempt to call method 'getAngle' (a nil value)

self.ball:getY() works just fine in the same project.

I couldn't find any examples or tutorials using getAngle. Does anybody know what I might be doing wrong?

Thanks in advance.

Comments

Sign In or Register to comment.