| About body rotation [message #2694] |
Mon, 23 April 2012 15:53  |
wzh1989210 Messages: 2 Registered: April 2012 |
Junior Member |
|
|
Hi,
I am new to nape.
I am creating a test for iphone.
when I use the body.rotation , the graphics' position changed. Why?
Before I use the rotation, the graphics' position is correct. really strange..
Thanks
|
|
|
|
| Re: About body rotation [message #2696 is a reply to message #2695] |
Mon, 23 April 2012 18:00  |
dELtaluca Messages: 2225 Registered: July 2010 Location: Malden Rushett, Surrey |
Senior Member Administrator |
|
|
by default, the graphics are updated like:
graphic.x = body.position.x;
graphic.y = body.position.y;
graphic.rotation = (body.rotation*180/Math.PI)%360;
I created nape!
|
|
|