4
votes
2D Pathfinding with rope constraint
The simplest solution would be to always path find from the stationary anchor and then append that path to the rope from the player to the anchor and use string pulling to get the path for the player ...
3
votes
Fix my Flow Field pathfinding
I had a similar problem this week, so I thought I'd post what I did. Dijkstra's algorithm is inherently discrete, so it will always give you directions that tend to funnel everyone into the same few ...
2
votes
Accepted
Movement system for thousands of entities
Myself, I'd solve this with a combination of flow field pathfinding and local avoidance.
First, the flow field: for each army, initialize a graph of map locations spanning the army and their goals (...
2
votes
Accepted
How to prevent cube intersecting with other objects when moved around with mouse?
I can think of three different approaches to your problem. One involves using an object silhouette or shape as a preview of where it's going to be placed; another is a real-time positioning of the ...
1
vote
Accepted
Ensure a path always exists between moving objects
Note: I am not looking for any type of cooked solution, just some references to existing algorithms, implementations,... to look into by myself.
A noteworthy algorithm here is Velocity_obstacle.
Its ...
1
vote
Accepted
Collision avoidance not only AI wrong
I found out logical mistake, I should do the sum of angles as totalAngle and then divide it by the count of angles so I get ...
1
vote
Accepted
How to make one box Collider 2D go through another in Unity?
You should use Pyhsics2D.IgnoreCollision() since Box Collider 2D inherits from Collider2D, not Collider. Found more info here, check this one out.
1
vote
Wall sliding in JavaScript; works, but gets stuck at corners
You're not handling line endpoints correctly. Consider only a single line segment. The collision of a circle at the endpoint of a single line segment should be rounded, right? Like, if you trace out ...
1
vote
Accepted
Intersecting ORCA lines finding non-optimal solution for fast units
Okay, I've found the problem, and it was written in the original paper, which I missed among all other papers apperantly… I mean, there were tons of papers about it, that, for some reason I never ...
1
vote
Accepted
How to prevent collisions between instantiated prefabs
I ended up using the suggestion of @allnodcoms to use layers. I queue up a full generation to be simulated on 16 separate layers using a SimulationManager. Although ...
1
vote
Collision detection and solution causes teleportation on corners
I found solution. First of all I made collision detection function for readability, then I made collision for each axis apart.
...
1
vote
Accepted
Dodge different type of obstacles
I made it :D
Using A* with time dimension. Creating the obstacle paths just one time, on cast.
Then i simply do A* and on neighbor check i check for the time the spot would have as well, if a spot is ...
1
vote
Accepted
Enemies overlapping
This is a very common problem in AI pathfinding, and you generally have three possible solutions:
Accept the overlap. But this is far from ideal.
Queue your enemies. Detect a collision, and stop the ...
1
vote
Accepted
Ray-box intersection problem
Rays are infinite, the start and endpoint only define them. What you're looking for is a line segment based intersection.
It's very easy to convert a ray-box intersection to a line segment-box one ...
1
vote
Accepted
Vector field collision avoidance
So yeah... I solved my problem... I was normalizing the vector from the enemies before adding it with the original direction, and this creates a step too big between "no collision" and "collision".
1
vote
Accepted
How would I go about implementing a collision avoidance check, avoiding moving objects from multiple directions?
The first thing to do with any large collision sets is elimination. Range check in itself is a good start but another check is simply a direction check. Is the direction the asteroid in this case ...
1
vote
Deterministic turn based navmesh pathfinding algorithm with agent avoidance
The way to solve it in two steps:
Make your 'avoidance algorithm' prevent NavMesh movement from navmesh.SetDestination() when near another object with navmesh.Stop()
With Random.seed you will be able ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
collision-avoidance × 63collision-detection × 22
unity × 17
path-finding × 15
ai × 13
collision-resolution × 9
steering-behaviors × 9
c# × 7
2d × 7
physics × 7
algorithm × 6
rts × 5
collision-prediction × 5
movement × 4
navmesh × 4
xna × 3
c++ × 2
libgdx × 2
javascript × 2
sprites × 2
python × 2
computational-geometry × 2
java × 1
android × 1
3d × 1