Quantcast
Channel: Questions in topic: "vehicles"
Viewing all articles
Browse latest Browse all 123

Most Efficient Method for Steering for Vehicle AI

$
0
0
Hi Unity Community! Any tutorial regarding vehicle AI gives the following code for getting the steering magnitude (-1 to 1) to the next waypoint: Vector3 pos = transform.InverseTransformPoint(nextWaypoint.position); steerMagnitude = pos.x / pos.magnitude; But since this involves the Sqrt operation, is there a more efficient method? Because I plan on having about minimum 50 vehicles in the scene at a time. But that can even increase to 100 - 200 vehicles. Or is the Sqrt operation fast enough for **mobile devices** to cope with 200 vehicles using this code each FixedUpdate? I also have other code like OA, etc.

Viewing all articles
Browse latest Browse all 123

Trending Articles



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