Restrict Object Movement Within Changing Area

Hello all,

I am working on a project that will require an AI character to move around in two separate “modes” (for lack of a better term). The two modes are as follows:

  1. RTS Mode: Click to move the character within a NavMeshBoundsVolume (already implemented)
  2. Restricted Mode: Click to move, but restricted to a radius (i.e. the player has the character selected, but it can only move within a set radius centered on the character)

I’ve been wracking my brain on this one for a while now, so any insight (don’t have to provide a solution, just a pointer in the right direction) would be much appreciated.

Thanks,
Amsirahc

Well, you could be simply limiting the click location to a radius around the character. I mean allow player to click wherever they want, but clamp the resulting click coords to your desired radius. It’s not perfect but will get you pretty far in my opinion.

Cheers,

–mieszko

Thanks Mieszko!

That’s exactly what I was looking for. I knew it was simple, but so many things going on right now. LOL

Does anyone know how to move a character in a certain area. For example, that within a volume you can only move back and forth but not up and down. Thank you