Push player out of ground

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Posts: 13
Joined: Fri Dec 09, 2011 9:48 pm

Push player out of ground

Post by Spykam22 » Fri Aug 30, 2013 10:08 pm

Hello! I noticed that when an object is collides or is stuck inside another physics object, it pushes itself out of it. Example: a box is on the ground but part of it is in the ground so it pushes its self up and out of the ground. I would like to increase the effect of this so it pushes out really fast. How would I do this? Thanks :)

Site Admin
Posts: 4707
Joined: Tue Jul 04, 2006 4:45 am

Re: Push player out of ground

Post by Norbo » Fri Aug 30, 2013 10:38 pm

Increasing CollisionResponseSettings.PenetrationRecoveryStiffness and CollisionResponseSettings.MaximumPenetrationCorrectionSpeed would do it.

If your objects are larger than the default settings are tuned for, then the latter one is probably the most important. In this case, you may also want to check out the demos ConfigurationHelper.ApplyScale function. It adjusts the behavior of a lot of different tuning variables proportional to a scaling factor.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests