i am using flash pro cs5.5, and WCK latest from github... and i can't get setTransform to work as expected...
So i am working on a simple catapult game where i am launching a ball via a box(the catapult arm) thats on a spring joint.. i can launch the ball fine, i have skinned the ball, etc...
when the ball stops moving, i am checking if it's awake like so :
wrld.ball.bdy.IsAwake() /// btw i have setup bdy like so , public var bdy:b2Body = b2body in the Box class i am extending...
so when the ball stops rolling around, i want to put it back to the starting point so it can be relaunched...
i am doing this :
wrld.bl.bdy.SetTransform(new V2(ballX, ballY+10), 0);
i had set the ballX ballY vars earlier in the script like so :
var ballX = wrld.bl.bdy.GetPosition().x; /// returns -0.6666666865348816
var ballY = wrld.bl.bdy.GetPosition().y; /// returns : 9.945833206176758
my problem is this,
after i call the SetTransform method, the ball moves to where i want it to go, BUT the ball is FROZEN,.
i cannot drag it, nor does it fall and react to gravity anymore.
Please can anyone assist me here, or know of a better way to do this?
i am not the greatest at physics for game development, but i am very well versed in oop, and as3.
Any and all assistance is greatly appreciated.