- Home /
Constraining GameObject Movement Inside a Mesh Volume
Hello everyone, I'm trying to find a way to constrain the movement of a gameObject within the "size" or volume of a mesh. I've seen renderer.bounds, but if the mesh is not square or rectangular, I don't see it as being a good solution.
I have 2 example pics below that (hopefully) show what I'm trying to accomplish. I'm not looking for a complete answer, just to be pointed in the right direction (concepts to learn, functions to understand, etc). Any advice is greatly appreciated.
In the pics below: the idea is that once a player gets close enough to a audio source, the GameObject with that source tires to move as close to the player as possible, constrained only by the boundaries of the mesh.
[1]: /storage/temp/24884-playermovingvertically.jpeg
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Making mesh bounds visible ? 1 Answer
Rotating object's xyz-axis but not its mesh 2 Answers
2 questions (movement speed + terrain.) 0 Answers
Player movement 0 Answers