Box2D Forums

It is currently Wed May 22, 2013 1:41 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Turning bouncing off
PostPosted: Wed Jun 13, 2012 2:36 am 
Offline

Joined: Wed Feb 23, 2011 7:28 am
Posts: 3
Is there any simple method to modify Box2D, in such a way, that there is no bouncing at all?

I've allready modified it, by turning restitution off (completely removed source that was connected to restitution). But I still have some situations where my body bounces. The situation is simple - I have a lot of static bodies (only polygons) as platforms, and single circle body as character (so as You probably know, I'm making a platformer). Now, what I want to achieve - I want to add some forces to the character, and I want Box2D to simulate the movement based on those forces and react to platform collisions (prevent intersections). But I don't want Box2D to make any collision response other than preventing intersections and invoking collision callbacks.

So, my question is - is there any simple method to turn "dynamic response" off? Where can I find code that is connected with this?
I guess (because I don't know box internally) that it works like this - if there is intersection, move object away, by minimal translation vector in normal direction, and then add some force impulse to the body (the bounce) - I want to leave the first part and remove the second.

Thanks,
M


Top
 Profile  
 
 Post subject: Re: Turning bouncing off
PostPosted: Tue Jun 19, 2012 4:52 pm 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
It sounds like you want a character proxy, which is not in Box2D. You can approach that behavior by used fixed rotation, increasing the velocity and/or position iteration count, and by disabling warm starting.


Top
 Profile  
 
 Post subject: Re: Turning bouncing off
PostPosted: Tue Jun 19, 2012 8:31 pm 
Offline

Joined: Tue Sep 25, 2007 2:22 pm
Posts: 483
I prevented this by using 1/120 of a second per tick and multiple steps. The larger the penetration amount, the larger the possible error.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group