Static shapes ignore body position and angle?

Official forum for the Chipmunk2D Physics Library.
Post Reply
maximile
Posts: 157
Joined: Mon Aug 20, 2007 12:53 pm
Location: London, UK
Contact:

Static shapes ignore body position and angle?

Post by maximile »

Is this the case? Do I have to use the offset and rotate the vertices manually?

Because at the moment when I set a body to be static, and change its ->p and ->a, it draws in the right position but objects collide as if it's at (0,0). Is this what you'd expect? Or have I messed something up?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Static shapes ignore body position and angle?

Post by slembcke »

Are you moving it before or after you add it to the space? If you are moving it afterwards then you are going to have to update its collision data afterwards. You might also have to do it regardless of it being before or after the add, I'll have to check when I get home.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
maximile
Posts: 157
Joined: Mon Aug 20, 2007 12:53 pm
Location: London, UK
Contact:

Re: Static shapes ignore body position and angle?

Post by maximile »

Yeah, I was moving it before. Moving it afterwards makes it work great; thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest