Push player out of ground

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

Push player out of ground

Post by Spykam22 »

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 :)
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Push player out of ground

Post by Norbo »

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