- Home /
Question by
Andy T · May 14, 2014 at 02:01 AM ·
charactercontrollerdistancenewbie
How to make a player move around a tower at a set distance?
I'm working on a game project in Unity where the player needs to progress up a tower but I want the player to always be at a set distance from an empty game object placed at the centre of the tower. I tried the 3rd person controller but the player always falls of the edge of the bricks around the tower. It is a 3D tower and a 3D character. I'm an absolute newb when it comes to coding and would really appreciate some help with this. Thanks in advance.
Comment
What kind of movement are you looking for? Is it like a cylinder where the player will be stuck to the side at a certain radius?
Answer by Cherno · May 15, 2014 at 12:57 AM
You don't need an empty gameObject if you know the center position. Try to do it with Mathf.Clamp.
Your answer
![](https://koobas.hobune.stream/wayback/20220613145008im_/https://answers.unity.com/themes/thub/images/avi.jpg)