Timeline for 3D First person Rotate Character Unity
Current License: CC BY-SA 4.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 27, 2023 at 3:37 | history | edited | Kelly Thomas | CC BY-SA 4.0 | fix typo |
| May 26, 2023 at 21:15 | comment | added | Willem | Programming is, each class is only responsible for what it is created for. That means, a player camera has nothing to do with a compass. And vice versa. But I hear you thinking, the compass needs to know the rotation of the player. For such I would create a reference at the compass to the player, where the player has a property - or just a public member to get the rotation (or y degrees). Programming is also; reading the official dull pages of microsoft, unity and others. That's where the magic is being explained. | |
| May 26, 2023 at 21:15 | comment | added | Willem | Websites like this you should learn. You can't comment here because you can't at the other question. What you are asking is worth an entire new question, even if it's not code related. Even without code add the tags Unity and C# in any case. | |
| May 26, 2023 at 20:56 | comment | added | Jamelaumn | since I cant comment on your answer there I will make it here, but what if like I want to bind all the postive and negative values to the current rotation? that code will do that? like the new "movement compass" will be redirected to the rotation? | |
| May 26, 2023 at 19:53 | comment | added | Willem | Would update both the PlayerMovement.transform its position and rotation, rather then splitting them. The camera, as long as it is attached to the gameObject wil nicely follow along. Take a look at this question: gamedev.stackexchange.com/questions/205760/… | |
| May 26, 2023 at 14:11 | comment | added | Jamelaumn | I edited the code a little bit please take a look. The main camera is being passed in public Transform cameraTransform, the playerCamera.PlayerShouldRotateByCameraAngle is because I can like keep my player going in the same direction even if I change camera in third person, and if trtue, my player will move in the direction of where my camera is pointing at | |
| S May 26, 2023 at 11:17 | review | First answers | |||
| May 26, 2023 at 18:02 | |||||
| S May 26, 2023 at 11:17 | history | answered | Willem | CC BY-SA 4.0 |