Physx auf Terrain!

Posted By: DexLoomer

Physx auf Terrain! - 06/04/15 17:04

Hallo,
ich versuche ein Auto mit Physx auf Terrain fahren zu lassen.
Das Ding fällt aber immer durch den Boden!

Beispiel:
car_terrain_test.zip

Hat jemand eine Idee?
Posted By: 3run

Re: Physx auf Terrain! - 06/04/15 17:11

Hi!

Don't scale terrains in WED, do that in MED right before placing it in your level via WED. PhysX doesn't support scaled terrains, that's why your car probably falling through it. And I just wanted to make sure, that you've registered terrain in physX via script.

Best regards!
Posted By: DexLoomer

Re: Physx auf Terrain! - 06/04/15 18:12

Thank you for your answer,
i´ve not scaled the tarrain in WED. It is imported in original size.
I try to registred the terrain, with this action:

Code:
action actTerrain() 
{
	pXent_settype (my, PH_STATIC, PH_POLY);
	wait(1);
}



But the car still falls through the floor.
Posted By: 3run

Re: Physx auf Terrain! - 06/04/15 19:30

First of all, you don't need that 'wait' after the 'pXent_settype'.
You may try to use 'wait' right before registering the terrain in physX (just for testing purpose).

Try this one:
Code:
pXent_settype(my, PH_STATIC, PH_TERRAIN);

In addition, take a look at 'knights_on_wheels' which can be found at 'GStudio8/samples'.
It's a good example of how to setup level and vehicle physX.

My best regards!

Edit: I've found out what's causing the problem, you need to set terrain position to 0,0,0 (in WED). That's another limitation after not scaling the terrain. I just tested it with your demo, and it works. Good luck!

Edit2: and don't forget to increase Z position of your vehicle, cause otherways it will fly up to the sky laugh
Posted By: DexLoomer

Re: Physx auf Terrain! - 06/04/15 20:16

Thank you for your tips, I'll try it tomorrow.
Posted By: DexLoomer

Re: Physx auf Terrain! - 06/05/15 04:10

Thank you very much, it´s work fine!
The problem was that I did not set the terrain on the 0,0,0 coordinates.

Best regards!
Posted By: Anonymous

Re: Physx auf Terrain! - 06/05/15 14:45

*Crack* "And 3Run knocks the ball right out the park folks. HomeRun!!!'"
© 2024 lite-C Forums