how to set this parameter -.-

I need to set the global parameter "NX_BOUNCE_TRESHOLD"of the physics SDK.

The default value "-2" is super large(absolute value) for me.

In the class PhysicsEngine

Code Snippet

public static int RESERVED_MATERIAL_INDEX;

public static PhysicsEngine GlobalInstance { get; }
public int HoleMaterialIndex { get; }
public NxPhysicsSDK* NativeEngine { get; }
public bool RenderGeometry { get; set; }
public static int TraceLevel { get; set; }

I found the pointer to NxPhysicsSDK(not sure yet),but how to access it?Is it the right way to set "NX_BOUNCE_TRESHOLD"?

Thanks in advance!

[864 byte] By [CraneM.] at [2008-1-9]
# 1

It may not be possible for you to set this parameter since we haven't exposed it through the C# API. It may be possible for you to build your own C++ DLL that links to the Ageia engine if you have your own copy of the Ageia SDK but that is a fairly advanced topic. We should explore easier alternatives first.

Why is the default bounce threshold super large for you? Can you solve your problem by adjusting the restitution in the materials involved?

-Kyle

KyleJ-MSFT at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...
# 2

Hello,Kyle

Thanks for your quick reply!

We need to add a ball into the simulation world in our project.And the ball is relatively small with radius 0.02135m and mass 0.046kg.

We want the ball to act as a "ping-pong" but now a "shot".When hits other entities,it just changes direction and rolls along the "wall".The largest linear speed of the ball is about 3.5m/sec and occasionally bounce takes place.

I set the restitution(0.6~1.0)&restitution combined mode(MAX) of the ball material and change render mode to physics to increase the FPS. NOTHING changes.

To my way of thinking,the restitution modifies the behaviors of bounces,but now it does not bounce at all.So I turn to the

'NX_BOUNCE_TRESHOLD" in the SDK.

CraneM. at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...
# 3

Hi,Kyle

I need to solve this problem badly for the whole project is anchorring here now.

We have a copy of the Ageia SDK,but I really do not know how to build C++ DLL that links to the Ageia engine as you said to set this parameter.Could you give me some examples or code snippets to implement the DLL,please?

Thank you very much.

CraneM. at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...
# 4

I have seen this problem too and I reported it previously on this forum. I have a "soccer ball" in my Maze Simulator that will not bounce off walls. If it approaches the wall at an angle it loses all of its momentum perpendicular to the wall and then just runs along the wall with the component of velocity that was parallel to the wall.

It appears that you might have identified the problem.

In my case, the walls have infinite mass (mass = 0), although I don't know if this affects the outcome.

I have played with the restitution and various material properties, but I could not get it to work.

Perhaps this needs further investigation because the physics is obviously wrong in this case. Alternatively, it needs a very simple example of a small ball that will bounce off walls when you push it.

What do you think Kyle?

Trevor

TrevorTaylor at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...

Microsoft Robotics Studio

Site Classified