Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: PolyMad on September 09, 2018, 07:29:35 PM
-
I don't really know if this is a problem coming from Playmaker, Unity or PhysX itself.
Fact is, I add torque to the wheels of my vehicle, but there seem to be a ceiling to the power that can be added, and I'm EARLY hitting that ceiling.
In fact, my vehicle can't go past something around 80 Km/h (didn't check exactly, still have to make the speedometer, but surely it's not the 300 Km/h I need).
For the same problem, I can't rotate the front wheels with the needed decision and power: I have to put low spring power so to be able to rotate them with the weak power the ADD TORQUE action gives.
I tried to put 100, 1000, 10000 and millions, but it simply doesn't change anything past 100 I think.
My hypothesis are:
- Playmaker has a standardized ADD TORQUE action that applies the force to a point too near to the axis, so increasing the power doesn't really add up. This can be easily circumvented.
- Or, it's Unity to have this problem. This would be a little bit harder to fix.
- Or, PhysX doesn't "expect" that such high torque added to an object, so it's limited in this regard. If so, I'm f**ked. But I don't think it's probable.
Does someone have any idea about what's going on?
I'm stuck, because I'm making a racing game, not a pizza delivery simulation :-X
You can download a build to see what's going on (ZIP file for Windows x64):
https://drive.google.com/open?id=1cn_2H1LOLC4BJcFpAJXoGI0426JM4YiO (https://drive.google.com/open?id=1cn_2H1LOLC4BJcFpAJXoGI0426JM4YiO)
-
Hi,
that could be your drag factor and angular drag on your RigidBody ( both car and wheels)
Bye,
Jean
-
Ye, that was the first thing I thought about, as it feels like swimming in honey, but it isn't: I put them both to 0 in all the affected rigidbodies.
-
uhm..
I would ask on Unity forum and UA just to make sure something else is in the way.
Bye,
Jean
-
I've probably found the problem, thanks to this guy:
https://answers.unity.com/questions/1094917/why-does-my-rigidbodyaddtorque-gets-limited.html
https://docs.unity3d.com/ScriptReference/Rigidbody-maxAngularVelocity.html
There's a Rigidbody.maxAngularVelocity parameter that manages the PhysX objects.
Could you make an action to set this up?
-
For now I managed to add a little C# with the command to set the parameter and it works :D
-
Hi,
ah! that's the one.... it's on the Ecosystem : RigidBodySetMaxAngularVelocity
Bye,
Jean
-
Duh! Thank you! Sorry, next time I'll search the EcoSystem first!
-
Hi.
just to let you know.
On the Ecosystem you can even search by pieces of code :)
in your case for example search for "maxAngularVelocity"
-
Great! :o :D