# Rotation with axis/pivot around player

**URL:** https://discussions.unity.com/t/rotation-with-axis-pivot-around-player/17228
**Category:** Questions & Answers
**Created:** [March 21, 2011, 6:46pm UTC](https://discussions.unity.com/t/rotation-with-axis-pivot-around-player/17228 "2011-03-21T18:46:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/system/32/97283_2.png) [@system](https://discussions.unity.com/u/system)
#### Post date: [March 21, 2011, 6:46pm UTC](https://discussions.unity.com/t/rotation-with-axis-pivot-around-player/17228/1 "2011-03-21T18:46:34Z")

</div>

I'm making a 1st person puzzle game where you have to navigate the walls and ceiling to advance through a maze. I want the player to be able to rotate the maze around the player, using the player as its pivot; is there some way I could do this?

I had previously been trying to simply use transform.rotate on the level for rotation but I guess it moves too fast or something since the player usually ends up glitching through the mesh collider I have on the level(with rigidbody)

I am using the first person controller that came with unity to handle the movement of the player and I plan on putting the rotation script on the level since it's just one object

I thought it might have to do with how a third person camera orbits around a player but I wanted to see if there was a different way to go about it since my last endeavor ended in failure (collision detection destroys my soul)

Any help would be awesome...

---

<div class="post-metadata">

### Author: ![Scribe](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/scribe/32/44261_2.png) [@Scribe](https://discussions.unity.com/u/Scribe)
#### Post date: [March 21, 2011, 7:32pm UTC](https://discussions.unity.com/t/rotation-with-axis-pivot-around-player/17228/2 "2011-03-21T19:32:03Z")

</div>

if i understand what your asking right then you should use transform.RotateAround

```auto
var Player : Transform;
var RotateSpeed = 20;

function Update() {
    // spin the player around the world origin at 'RotateSpeed' degrees/second.
    transform.RotateAround (Player.position, Vector3.up, RotateSpeed * Time.deltaTime);
}

```

put this on your maze or rotating object and set the player to your player in the inspector

hope this helps

Scribe
