Wheel Shape Question

ahmedismaiel

25-03-2006 15:39:00

i'm having a problem with rendering the wheel in your car sample not using the debug visualization but i couldn't get the orientation of the wheel .the wheel looks like it is not moving at all (i mean rotating about the Z axis)

please help.

betajaen

25-03-2006 18:39:46

I have had the same problem to; Funny enough I was actually thinking about that when I was just walking home from work just 10 minutes ago!

There isn't anything in the WheelShape in PhysX that gives off an Axle speed, the closest I've found; Is getting the RPM, which doesn't work if there is no torque applied (it just reports 0).

Hopefully this will be fixed in later versions of PhysX, but for now just rotate the wheel based of the RPM.

ahmedismaiel

25-03-2006 21:49:29

there is a function in NxWheelShape called getAxleSpeed ()
but i don't know how helpful is this.

i' don't understand the car physics too much but as it's a speed,does this mean that i should calculate the current rotation value from the axle speed ?,what is the equation to do that ,is time is one of the inputs?what are the other inputs?

betajaen

25-03-2006 22:34:05

Yeah, that's the one. However it only reports the Axle Speed when torque is applied, so if the car is rolling down a slope with no power applied, the Axle Speed is reported as zero.

Like how when you can ride a bike going down a hill, without turning the pedals. The chain isn't moving but the wheel is, same with the car. The Axle isn't turning but the wheel is.

Strange I know, but only other way to get a true way of getting is the speed is some how analysing the vertices (then working out speed from last frame) of the orange triangle-circles wheels in the debug view given back from PhysX.


Unless Aegia adds a lovely getWheelRPM function it's guess work I'm afraid.