Any chance we'll get more snippets? #56
Replies: 2 comments 3 replies
-
Hello, I was wondering if you'll be adding more snippets, especially for the Character Controller aspect. We always add more snippets - just compare the number of snippets between PhysX4 and PhysX5. So it is very likely that we will add more, yes. We are in the process of replacing the old samples (from e.g. PhysX 4) with equivalent samples in Omniverse. There are already a couple of character controller test scenes there, that you could perhaps look up. Or, I think you used the previous PhysX versions, the old character controller sample(s) from PhysX 4 should probably still compile against PhysX 5, and could be worth looking at for now. Alternatively I have an unofficial collection of tests / examples in PEEL here: https://github.com/Pierre-Terdiman/PEEL_PhysX_Edition I am not familiar with the character controller sample from Jolt so I cannot really comment on that.
|
Beta Was this translation helpful? Give feedback.
-
Had a quick look at the character sample in Jolt. I didn't have time to dig deeply into it but it seems to be a "dynamic character controller", as opposed to a "kinematic character controller" (correct me if I'm wrong). A dynamic character controller is just a regular rigid body, tweaked so that it doesn't rotate / doesn't slide / etc. It is controlled by applying either forces or impulses/velocities to the rigid body. A kinematic character controller uses a kinematic body and is directly controlled by displacement vectors. PhysX has a dedicated kinematic controller module, but it doesn't have a specific "dynamic character controller" module - it's up to users to setup a regular rigid body for that purpose, if they want. I haven't played with dynamic character controllers in PhysX for a long time, but I don't see a technical reason why it would be any different from Jolt's version in the end. As far as I can tell / see, the Jolt version uses a regular rigid body, which would be a PxRigidDynamic actor in PhysX. I don't know if I am looking at the right test / sample in Jolt, but I think this version exhibits the usual problems associated with dynamic character controllers. For example if I move the character on the steep static ramps / slopes and release the keys to stop moving, the character starts to jump in the air "unrealistically". Then on landing, it starts sliding on its own. With a kinematic character controller, there would be no jump, and no sliding. A kinematic has other issues, I am not saying they are superior. I am only saying that the PhysX kinematic character controller is not an exact match for what I see in that Jolt sample. But as far as I know, you could probably easily replicate a dynamic character controller like Jolt's with a regular PxRigidDynamic, as long as you can live with the limitations inherent to dynamic character controllers like the ones I mentioned. |
Beta Was this translation helpful? Give feedback.
-
Hi there, I just integrated PhysX 5 into my engine, for basic shapes, after having previously integrated Jolt (which was fine, but PVD and Omniverse and backing from Nvidia + use in most games convinced me to restart).
I was wondering if you'll be adding more snippets, especially for the Character Controller aspect. I know there is a doc page about it but it would save me time / effort if there were something similar to Jolt's sample, where you can walk around and jump on moving objects, etc. Jolt's been out for far longer but so far seems to have way more developed test gyms. Reference implementation and samples are so important, so I hope you can do us all a solid and add more snippets, especially a character controller gym. This is the bread and butter of gaming so it would be great to see, in practice, how you would implement these things. Including a jump button, character being pushed (or not) by objects. I worry that Jolt simply has better functionality in this respect, but I just couldn't risk using a physics engine that's only maintained by 1 person as a hobby / side project. But still, Jolt so far has much better code samples and I hope this is one area that PhysX will continue to improve upon.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions