Jump to content
  • Advertisement
Sign in to follow this  
562538332

Physx Character Controller 's Shape always hover from the ground

This topic is 989 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I tried to use Physx to impledent a Character Controller(PxController). Physx supports two Controller shapes: Box and Capule.
They are defined by PxControllerDesc.

Even I set the description's contactOffset to a number that is very close to 0.

Both of them showed an unexpected result:

[attachment=29473:box.JPG]
[attachment=29472:Capsule.JPG]

The ground was on the plane whose high was 0.

I wondered if the character was actually hovered from the ground. So I used getFootPosition() to get the foot position. The result is unexpectedly 0. But from the image the result should be a result high than 0.

Why did the physx show that strange result?
And how to solve this problem?

Edited by 562538332

Share this post


Link to post
Share on other sites
Advertisement

Have you set offset/thickness  for the ground object as well?

No I haven't set anything for it. Just simply created a TriangleMesh for it. 

Share this post


Link to post
Share on other sites


No I haven't set anything for it. Just simply created a TriangleMesh for it.

PhysX have property for every collision object, back in my time it was called "skin width" or something like that, it is simply the additional orthogonal uptake of shape where collision of the object appears ahead, it can be positive or negative or neutral.

Share this post


Link to post
Share on other sites

 


No I haven't set anything for it. Just simply created a TriangleMesh for it.

PhysX have property for every collision object, back in my time it was called "skin width" or something like that, it is simply the additional orthogonal uptake of shape where collision of the object appears ahead, it can be positive or negative or neutral.

 

I had noticed that property and set it into zero for both ground shape and character shape, but it couldn't eliminate that phenomenon! I wonder whether there is something else related to that phenomenon.

Share this post


Link to post
Share on other sites


I had noticed that property and set it into zero for both ground shape and character shape, but it couldn't eliminate that phenomenon! I wonder whether there is something else related to that phenomenon.

In case you have analyzed all plausible properties, it may be that your capsule is a perfect primitive, while your rendered triangulized capsule shape is aproximating it only visually, Could it be? Also, I would encourage you to drop "character controler" object of physX, and use dynamic object primitive with innertia tensor set to 0,0,0 (it willl always anchor, never rotate) you will have much more correct behaviour (character standing on dynamic objects and etc goodies). This worked for me in much more satisfiable extent, wheather sliding, interacting and so on.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!