Blocking volume

The BlockingVolume doesn’t work so great when the tank is parallel to wall and next to it:


The mouse in on the lower-left of the screen, where the debug sphere is. Note where the tank is pointing, which is not toward the mouse, i.e. the center of the sphere. It feels really bad when playing.

What I think is better is a horizontal volume (e.g. scaled to 1000x1000x1) just below the map (i.e. some sort of giant invisible floor just below the regular one). It feels much more natural.


Now the tank points more or less where the mouse is.

However, one has to be careful with the camera angle. If the angle is too shallow, the mouse could point at the sky and never intersect the invisible floor, which would bring us back to square one. With the default camera field of view (90 degree), rotating the spring arm to 45degree fixes the issue (that’s what I use in those screenshots).
Alternatively, one could have invisible walls+floor, and put the walls far enough the main map so that they can never be near the camera.

2 Likes

I know that this is a late response, but I’m certain someone’s gonna find it useful.
Instead of always calling this RotateTurret() function and using those barriers, simply just put in an if statement that ensures that there’s an actual HitResult.
if (HitResult.IsValidBlockingHit())
{
RotateTurret(HitResult.ImpactPoint);
}
Hope it helps

1 Like

That’s what @Timothy_Murphy proposed in his own post.

Personally, I prefer blocking volumes so that the tank always responds to the user input regardless of where the user points to. It feels more natural and smoother that way. There is no halting of the rotation when the mouse/controller moves over an empty area, especially if one implements holes inside the arena (e.g. traps, thick columns with an empty core, U-shaped arena, …). This is exacerbated by the fact that the turret is “slow” and needs time to catch up.

1 Like

Privacy & Terms