Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Why can't I use setX on a physics body, when setPosition does work? — Gideros Forum

Why can't I use setX on a physics body, when setPosition does work?

Tom2012Tom2012 Guru
edited November 2012 in General questions
self.body:setX(200) doesn't work but
self.body:setPosition(200,100) does...

Here's the error:

Classes/Hero.lua:30: attempt to call method 'setX' (a nil value)
stack traceback:
Classes/Hero.lua:30: in function 'init'
[string "property.lua"]:31: in function 'new'
Scenes/Level 1.lua:74: in function 'init'
[string "property.lua"]:31: in function 'new'
Classes/scenemanager.lua:264: in function 'changeScene'
main.lua:10: in main chunk


Just curious why?

Thanks!

Comments

Sign In or Register to comment.