JustInvoke / Randomation-Vehicle-Physics

Vehicle physics system for the Unity engine.
https://justinvoke.com/game-assets/#randomation-vehicle-physics
865 stars 184 forks source link

How to increase power of boost? #37

Closed zelderus closed 5 years ago

zelderus commented 5 years ago

I want much more power speed when boost. What a parameter I should change?

JustInvoke commented 5 years ago

Try adjusting the boost power curve on the GasMotor script on the engine object inside a vehicle. The x-axis of the curve is the speed of the vehicle and the y-axis is the boost power. This makes it so the boost power changes as the speed of the vehicle changes.

zelderus commented 5 years ago

Thanks. I have changed this curve, it has add some power, but so little. If I add much more in the curve in any axis, then some exception in math occurs.

JustInvoke commented 5 years ago

What kind of exception is happening?

zelderus commented 5 years ago

Wheel.cs - float EvaluateTorque(float t):

  1. Assertion failed on expression: 'curveT >= GetRange().first && curveT <= GetRange().second' UnityEngine.AnimationCurve:Evaluate(Single)
  2. Assertion failed on expression: 'curveT >= m_Curve[lhs].time && curveT <= m_Curve[rhs].time' UnityEngine.AnimationCurve:Evaluate(Single)

And other like this. This happen when I set y-axis much more on less x-axis (I want super speed like a rocket from start going, or just much faster than it is) - car on small speed dont going, wheels fast rotating and drifting, and then this exceptions occurs. When I set y-axis less - boost power so little :(

JustInvoke commented 5 years ago

Well for now I can't pin down why the curve throws errors with large values. Clamping the input values for curve evaluations doesn't seem to fix it. One thing you can try is increasing the feedback RPM bias on the driven wheels if you haven't already. Maybe you can combine this with slightly lower boost values and increased forward friction on the wheels to keep the fast acceleration effect.

zelderus commented 5 years ago

increased forward friction on the wheels

Thanks. That's what i wanted.