# How do I make a mesh rotate with the ArcRotationCamera like a third person game control?

**URL:** <https://forum.babylonjs.com/t/how-do-i-make-a-mesh-rotate-with-the-arcrotationcamera-like-a-third-person-game-control/45683>\
**Category:** Questions\
**Tags:** mesh, character-controller, controls\
**Created:** [November 14, 2023, 8:59am UTC](https://forum.babylonjs.com/t/how-do-i-make-a-mesh-rotate-with-the-arcrotationcamera-like-a-third-person-game-control/45683 "2023-11-14T08:59:04Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [November 16, 2023, 9:06am UTC](https://forum.babylonjs.com/t/how-do-i-make-a-mesh-rotate-with-the-arcrotationcamera-like-a-third-person-game-control/45683/7 "2023-11-16T09:06:24Z")

</div>

> [@Mahmlo](#):
>
> I changed my mind and ima make it a first person game, so how do I do that?

Yes. It’s a fairly wide subject and it would be good to learn a bit around the different cameras and the handling. Collisions, move with collisions and self shadowing (shadowing in general) are all seperate topics you will need to learn one-by-one.

Also, note that you can sure have two (or more) cameras in your game. You could have a first-person view cam and a third-person view cam. Everything’s achievable, though I won’t tell you it’s easy. Nonetheless, lucky you, there are a fair number of examples, playground samples and tutorials for you to learn or simply soak-up the content, twist and tweak and experience.

For a starter, I made a small selection that might be of interest to you…

> [@Mahmlo](#):
>
> how do I attach it to the player in first person in a way that it will look “realistic”

There’s a nice PG I used myself as a base for this understanding. Below is the link:

> **[Babylon.js Playground](https://playground.babylonjs.com/#EV3NV5%2380)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

There’s also a simplified version, focusing on the aspect of ‘pointer lock’. When in first person view, you will want to lock the pointer and display your pointer as the ‘target’ for whatever interaction (i.e. shooting). This aspect of pointer locking in browser (with its constraint) and the targeting from the character/camera view is a subject on its own. Again, there’s a number of threads and examples in this very forum, if you search for something like ‘fps’ + ‘pointer’ + ‘target’.

> **[Babylon.js Playground](https://playground.babylonjs.com/#EV3NV5%2383)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

Here is the link to one of the threads around this subject of mouse move with cam/character and pointer lock:

> [@Camera rotation and mouse direction](https://forum.babylonjs.com/t/camera-rotation-and-mouse-direction/36926):
>
> Hi, Updated PG (it was definitely not showing the issue properly) [https://playground.babylonjs.com/#Y6Z81M#3](https://playground.babylonjs.com/#Y6Z81M#3) Please try the mouse move with the camera.rotation.z = 1.57; uncommented. You will experience what I am talking about. The issue with the pointerlock is that when the camera rotates around an axis, the mouse mouvement becomes inconsistent (you sometimes have to invert your mouse move to get the right movement). Is there a solution to automatically handle this, so that no matter the c…

* * *

On the side of third-person view and a camera that follows the character, there’s also some good stuff from experienced members willing to share their expertise. In particular, there’s this tutorial with playground examples from @DRLeria I’d like to share with you:

> [@Simple Demo Mini Tutorial for "Newbies" - Player moving (MoveWithCollisions)](https://forum.babylonjs.com/t/simple-demo-mini-tutorial-for-newbies-player-moving-movewithcollisions/40764):
>
> Good afternoon Group! Here I leave the download link of a simple project. LIVE DEMO [https://www.viseni.com/character\_navigation/](https://www.viseni.com/character_navigation/) SOURCE CODE DOWNLOAD LINK – UPDATED TO GITHUB Basically it is to learn how to use a navigation system of an animated character using the keyboard or virtual joysticks with MoveWithCollisions. The character is designed using AssetForge, for those of you who don’t know it and like the Low Poly world, I definitely recommend this tool. Later I have cleaned the mes…

> [@Mini-Tutorial for "Newbies" 2 - Character walking on Navigation Mesh using "Point To Navigate Method"](https://forum.babylonjs.com/t/mini-tutorial-for-newbies-2-character-walking-on-navigation-mesh-using-point-to-navigate-method/40816):
>
> Good afternoon Group! This time I want to share another mini-tutorial for “Newbies” including the code about Character walking on Navigation Mesh using “Point To Navigate Method”. LIVE DEMO [https://viseni.com/ptn\_navigation/](https://viseni.com/ptn_navigation/) SOURCE CODE [https://www.viseni.com/ptn\_navigation/ptn\_navigation.zip](https://www.viseni.com/ptn_navigation/ptn_navigation.zip) The workflow is similar to my previous post, in this case I have decided to work with Reallusion Character Creator and iClone. As you can see in iClone I’ve only used two animations, one Idle and one…

And there’s of course much more to find in this forum and in the docs. If I recall other links, I will post’em here for you.

Others, like @labris also have a lot to say about character control and camera handling. If you want to go the FPS route, you might want to have a look at Yuka. Though I don’t know what type of game you are planning to create?…

* * *

About collisions and move with collisions, I suppose a first basic understanding of how this works (with or without a physics engine) can be gathered from the docs. I’d suggest to start by reading [this section](https://doc.babylonjs.com/features/featuresDeepDive/cameras/camera_collisions) as well as this small part/workshop around [basic collision](https://doc.babylonjs.com/guidedLearning/workshop/Collide_Intro).

Then, if you plan using a physics engine (recom would be Havok), you’ll also find the section in the doc within the section dedicated to the engine. At this point, I could extend the content of this post writting tons of stuff and sharing dozens of links. As I said, the subject is wide and the specificities in BJS around this subject are numereous. So, I guess I’ll let you discover the above and continue your journey and whenever you have a more specific question, feel free to cc me.

Eventually, also post a new question with a specific title that’s related to just your problem/question. Try to always provide the context and if possible, a playground.

I hope the above will help and meanwhile have a great day 🕶

---

_[View the full topic](https://forum.babylonjs.com/t/how-do-i-make-a-mesh-rotate-with-the-arcrotationcamera-like-a-third-person-game-control/45683)._
