Where to find CollisionResponseSettings?

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
jakovd
Posts: 3
Joined: Thu Oct 27, 2011 2:07 pm

Where to find CollisionResponseSettings?

Post by jakovd »

I'm having the same problem that was mentioned on this forum several times.
The solution is, as Norbo explained, to fix CollisionResponseSettings.BouncingVelocityThreshold.
Now, I'm obviously missing some important documentation understanding skills cos I can't seem to find it in code.
Okay, I found its description in .chm API help file as a part of BEPUphysics.Settings Namespace.
But how can I use this to found out how to get to that CollisionResponseSettings object in my code?
Is it somewhere inside space object? Is it part of each entity object?
I'm using Intellisense to help me find whats in them, but I cant find CollisionResponseSetting... :/

I feel like I'm asking a noob question cos nobody seems to ask this after Norbo told them to fix it, but this is really giving me some headache. Help.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Where to find CollisionResponseSettings?

Post by Norbo »

The CollisionResponseSettings class is static. You can access CollisionResponseSettings.BouncinessVelocityThreshold from anywhere in your code, so long as you have BEPUphysics as a reference in your project and you have added the appropriate using statements/qualifiers.

So, either put:

Code: Select all

using BEPUphysics.Settings;
at the top of your file and refer to it as CollisionResponseSettings.BouncinessVelocityThreshold.

Another option is to bypass the using statement and refer to it inline:

Code: Select all

BEPUphysics.Settings.CollisionResponseSettings.BouncinessVelocityThreshold = x;
Note that if your project has BEPUphysics as a reference, you can right click on the CollisionResponseSettings, go to Resolve, and then use either of the options to do it automatically.
Post Reply