Alright, to be more specific I’ve been writing a formations system for a party of players. The problem arises when I click too close to an obstacle, and one of the markers for the formation clips inside of an object like so:
So basically what I need to happen is if these markers clip into an object, I need them to adjust themselves so they’re outside the object. I’ve wrote several scripts myself, using raycasts to detect collisions, and then adjusting them each frame based on which rays are touching the object. However these don’t work within one frame. Ideally i’d like to be able to make this happen within one frame so that as soon as I click, my characters get the updated locations of the markers, rather than their original locations. Any suggestions on where I should start?