Bug/Unexpected behavior

Discuss any Chipmunk bugs here.
Post Reply
Ezequiel
Posts: 8
Joined: Thu Jan 10, 2008 1:50 pm
Contact:

Bug/Unexpected behavior

Post by Ezequiel »

I'm not sure if this is something that happens only while using the python bindings (pygame) but I don't think so.

The problem is that, when I manually update the position, the velocity has a peak. I can easily see why is that (you are calculating the velocity using the manually induced displacement) but I don't think that's the expected behavior. Shouldn't the velocity ignore displacements that are manually induced?

I'm updating the position to move the sprite from one place to another after "entering" a door.

Thank you
Blue Prawn
Posts: 22
Joined: Thu Jan 03, 2008 1:36 pm
Contact:

Re: Bug/Unexpected behavior

Post by Blue Prawn »

I'm not sure to understand right the behavior you explain, but in the C demo number 3 (with the static triangles and falling pentagones) available with the sources, the pentagones have their position updated when they fall below the window area, to make them reappear above the screen.
And it seems that all works fine, it doesn't seems that the velocity changes while they wrap.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Bug/Unexpected behavior

Post by slembcke »

That must be a Pymunk thing to prevent the velocity/position from getting out of sync. The base Chipmunk code wouldn't cause that to happen.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
viblo
Posts: 206
Joined: Tue Aug 21, 2007 3:12 pm
Contact:

Re: Bug/Unexpected behavior

Post by viblo »

pymunk is not very fancy, all it does when you set the position on a body is to set the p element on the underlying c body struct. Is this not the right way to do it?
http://www.pymunk.org - A python library built on top of Chipmunk to let you easily get cool 2d physics in your python game/app
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Bug/Unexpected behavior

Post by slembcke »

Nope, that would be correct. I wonder what the original poster was doing that would change the velocity.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Ezequiel
Posts: 8
Joined: Thu Jan 10, 2008 1:50 pm
Contact:

Re: Bug/Unexpected behavior

Post by Ezequiel »

Ok, let me debug this some more and see if I can isolate the bug.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests