# PhysX Vehicles - Drive Axis Torque Issue

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

## Recommended Posts

Hi all, I'm having a bit of trouble with implementing a vehicle model in PhysX (you've all probably seen this kind of thread a billion times by now). Somehow, I finally got the tire force functions right enough to make it look at least somewhat realistic, but I'm suffering from a friction problem- or maybe we should call it a lack of friction problem. If I'm understanding this right, on a frictionless surface, as long as I apply torque to the drive axis, the car should continue accelerating. However, on a surface with friction, there should be an amount of torque that has to be applied to the drive axis to maintain a specific speed to counteract the force of friction (right?). The problem is that my vehicle doesn't seem to be obeying this basic physical property. As soon as I set the motor torque of the drive axis (using setMotorTorque) to 0, the car just keeps moving at the same speed (and sometimes slightly accelerates!). This leads me to believe that I don't have friction set up in my scene correctly. The funny thing is that the tires appear to grip the road just fine when driving around, turning, and braking. So I have a couple questions regarding this. 1) I set the dynamic and static coefficients of the Default Material (using setStaticFriction and setDynamicFriction) to values between 0.5 - 0.8 in my scene setup code- apparently what a regular road coefficient would probably be(?). Is there anything special I have to do to assign this material to the road (which is just an NxPlaneShape)? I didn't figure I'd have to assign the "default" material given its name, but I'm not sure about this. 2) I've heard that to get "accurate" vehicle physics in PhysX (I'm not too worried about 100% accuracy), you would have to "fake" a number of things... would this be another one of these cases? Edit: I'm also encountering something weird where if the speed of each the wheels reaches 0, then you can't move the car at all, it just sits there. I am using NxWheelShape (oh boy!). Any help would be greatly appreciated! Thanks [Edited by - mpenney on November 22, 2008 6:00:43 PM]

##### Share on other sites
Hi !
I don't know if you're OK with your pb now.
I'm trying to make my own car too in PhysX for 2 days.
So far it's very simple, and if you're using NxWheelShape, you shouldn't use traditional friction model.
You have to disable the friction in your material (NX_MF_DISABLE_FRICTION) and enable longitudinal and lateral velocities (NX_WF_INPUT_LNG_SLIPVELOCITY and NX_WF_INPUT_LAT_SLIPVELOCITY) for the wheels.
You should then create your tire functions (setLongitudalTireForceFunction and setLateralTireForceFunction) in order to recreate the frictions you will have with your wheels.

If your are still messing with setStaticFriction and setDynamicFriction then you're probably not doing it the right way.

Good luck !

1. 1
2. 2
3. 3
Rutin
13
4. 4
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633696
• Total Posts
3013397
×