Tag Info

New answers tagged

0

If you want to keep your agents as OBBs, then you'll have to do a proper intersection test. The problem you're having is that you're treating the moving entity as a point, and doing a simple raycast. You'll have to do a sweep test. If you're sticking with OBBs that can move in arbitrary directions an exact solution will be hard work. This article explain ...


0

You are just summing the forces, which means that the only way to reduce the seek behavior is to overwhelm it with a large avoid force. A simple alternative is to give each behavior a "desire" level in addition to a force. Then take the weighted average of the vectors to determine the steering. So seek might be always 1.0, and whenever you are far from an ...


0

Add a repulsive force from the obstacle if the obstacle is within a certain radius. This force could be scaled to overcome any voluntary force (such as the Seek force) if too close - that way the entity will do its best to avoid crashing. Obstacle Avoidance as described here includes such a braking force.


0

One way to solve this, given you're treating you entity as a point, is increase the size of the avoid targets by the size of the main entity. With circles you just add you radius to each target. Also circle targets are quite easy to check if you compare the squared radius. So you don't need to take the root of vector of differences of the points. some ...


2

One good solution is to send 2 rays from the upper and lower bound of the object rather then in the middle. You can then use the algorithm you were using before but use collisions for both rays rather then one. Don't forget to set the direction to the correct value of only one ray hits something (that is away from that ray). If both rays hit an object just ...


1

As per your comment my reading was wrong. I thought LocalPos was relative to the player, because I assumed that's what HelperMethods.PointToLocalSpace was supposed to be doing. But if LocalPos is still world coords, then your description at the end of the question gives it away. Your if statement: if (Math.Abs(LocalPos.Y) < ExpandedRadius) can be ...



Top 50 recent answers are included