Quantcast
Channel: Questions in topic: "wheelcollider"
Viewing all articles
Browse latest Browse all 490

Fast break with wheel colliders

$
0
0
Hello everyone, i am encountering some problems with vehicles i want to simulate. The setting is a 2.5D game where vehicles can move in one of several distinct layers of the map. That's the plan. To create a more realistic look for cars which drive over obstacles i am using wheel colliders. Unfortunately i am a complete newbie at this and i just can't figure out how to set up my wheels to get the behaviour i want. My main issues which i couldn't solve with my favorite search engine until now are the following: - i want a really short way to decelerate (rather comic-like setting) - fast acceleration - not too much bumpiness Making the forwardfriction higher helps with braking but the effect is that my car gets really wobbly, even on a simple plane. If i add more torque to get higher acceleration the distance to stop gets ridiculously long as if the ground was really slippery (like 75% of the distance i took to accelerate). After failing with configuration i tried to achieve something similar with sphere-colliders and transforming the position of my object but this approach has some major issues so i am back at wheel colliders again. I appreciate any ideas on the subject. Current setup: ![alt text][1] [1]: /storage/temp/94523-wheelsettings.png Mass of the vehicle is 1300. Wheel damping didn't chang anything noticeably. Forward-Stiffness 5 is already trouble-inducing T_T I played a lot with the Forward-Friction values because that's the only axis i want to move on. The relevant code snippet for acceleration is as follows: public void FixedUpdate() { float motor = maxMotorTorque * Input.GetAxis("Vertical"); foreach (AxleInfo axleInfo in axleInfos) { if (axleInfo.motor) { axleInfo.leftWheel.motorTorque = motor; axleInfo.rightWheel.motorTorque = motor; } } } If any more information is needed i will gladly provide it. Thanks for any help!

Viewing all articles
Browse latest Browse all 490

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>