3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: PH_CONVEX vs PH_CUBE
[Re: Rei_Ayanami]
#406608
08/25/12 15:55
08/25/12 15:55
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
User
|
User
Joined: Oct 2004
Posts: 900
Lgh
|
Okay, while preparing the demo for your, I found the problem:
The collision model was not centered (but positioned correctly). This led to the odd behavior, and everything works, as soon as I center the model in MED and adjust the position in the code.
Odd, however...
Still want a demo? Not needed, if works properly, recently I had a similar problem with my Ragdoll code, I remember now.
|
|
|
Re: PH_CONVEX vs PH_CUBE
[Re: Rei_Ayanami]
#406610
08/25/12 17:39
08/25/12 17:39
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
PhysX allows only either spheres, cubes, capsules and convex things - custom shapes made of several, custom orientated, scaled and positioned shapes. For a client, I needed very accurate physics shapes. So I took WED and created several scaled boxes, imported them, positioned, rotated and scaled them, to match the needed shape: Then, I wrote a small Lite-C script, that took the arrangement and wrote a MDL file, that encoded the position, scale, rotation and type of each sub-shape. During runtime, I load the MDL, read out the data and use pXent_addshape to build my custom and yet accurate complex physics shape. Yes, and it involves work. But in an ideal work, your modeller creates the model for your vehicle once and therefore you need only once to create such a setup.
|
|
|
|