how to move static body? thanks

Official forum for the Chipmunk2D Physics Library.

how to move static body? thanks

Postby magic373 » Wed Jul 30, 2014 3:37 am

I want to move static body , I use setPos() ...but it 's wrong.
magic373
 
Posts: 1
Joined: Wed Jul 30, 2014 3:33 am

Re: how to move static body? thanks

Postby slembcke » Thu Jul 31, 2014 2:20 pm

By making a static body in Chipmunk, you are telling it can be optimized because it will never move. If you do move it you need to let the cpSpace know so that it can update it:

http://chipmunk-physics.net/release/Chi ... alIndexing
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 2 guests

cron