# Tag Info

0

I have a MathHelper class for stuff like this (I've got a fast/inaccurate distance check, various radians-degrees conversions, this angle trig, safe angle addition, a snap method...). Here's the one that is of interest to you: public static double AngleBetweenPointsRadiansDouble(Vector2 P1, Vector2 P2) { return Math.Atan2( ( P2.y - P1.y ), ( P2.x - ...

0

After looking up how Reynolds seek steering works i realised that lerping wouldn't work. What you have to do is limit the steering to the maximum force which should be set very low to avoid instant steering. void FixedUpdate() { //move to position transform.Translate(Seek(new Vector3()) * Time.fixedDeltaTime); } Vector3 Seek(Vector3 target) { ...

1

I'd like to point you to the work of J. van de Berg et al. on Optimal Reciprocal Collision Avoidance. http://gamma.cs.unc.edu/ORCA/ In their paper, they provide the mathematics and algorithm outline on how to solve the problem you state in an optimal way using randomized linear programming. Best of luck :).

1

I don't think there's an efficient way of solving the problem exactly, but here's how I'd try to tackle it. First, I'd use bounding volumes around each object, instead of the objects themselves. Each object can be approximated by the union of more than one bounding volume, though. The simplest solution would be to compute a single bounding volume that ...

0

There are two ways to address this question that I can see. First, if you simply want to find a way to steer, then you just need to implement pathfinding (I find this quite helpful). That would be the end of that (and is the correct practical answer to this question), but I think you are more curious about a mathematical solution to your problem. To address ...

Top 50 recent answers are included