meiyunyang / chipmunk-physics

Automatically exported from code.google.com/p/chipmunk-physics
MIT License
0 stars 0 forks source link

Shapes added to space as static does not respect angle or position property #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a body with inf mass and inertia and use it to create a shape.
2. Add the shape to the space with space.add_static(shape)
3. Change the value of shape.body.angle or shape.body.position

The expected result would be that the body is moved or rotated to the angle or 
position it was changed to. What happens is that the shape.body object will 
report the new values but the collisions will still occur at the position and 
angle that was set before the call to space.add_static.

I'm running this on archlinux with chipmunk 5.2.0 and pymunk 1.0.0 (according 
to pacman)

Original issue reported on code.google.com by AdsumM...@gmail.com on 18 Mar 2011 at 2:28

GoogleCodeExporter commented 8 years ago
Apparently the chipmunk version is wrong since pymunk was package with it's own 
set of libraries.

Original comment by AdsumM...@gmail.com on 18 Mar 2011 at 2:32

GoogleCodeExporter commented 8 years ago
So I should change the documentation to be a little more clear, but you cannot 
move a static shape after it has been added to the space. The only thing that 
is special about static shapes is that Chipmunk can optimize them because you 
told it they will never move.

You can get more information about static shapes in the documentation here:
http://files.slembcke.net/chipmunk/release/ChipmunkLatest-Docs/#cpSpace

Original comment by slemb...@gmail.com on 18 Mar 2011 at 1:59