0

How to make a Third Person Controller ?

maezashi 2 years ago updated by Cocell 2 years ago 7

Okay so let me preface this with: I'm a noob that kinda knows coding from my 4 years old computer science degree that I never put to practice. I can understand code but not really write it anymore.

I tried to make a third person controller and the movement part is okay, but I can't make the turning right, my character model doesn't turn toward the direction it's heading. I have tried to translate code into graphs but it just doesn't work.

Is there a kind soul here that could help me please? Thank you for reading!

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

Just realized I forgot to mention that it is a 3D controller. I don't how to edit my first post, sorry!

could you share your code? you could maybe une euler angles to rotate your character. I don't know if this is what are you looking for but it could work. So you put the node euler angles and you put it in a update function here you do some branch like if it's right rotate y axis 10 for example and should work quite nice.

+1

I have this for the player movement, it works like a charm. Now what I want to do is to make the player face the direction it goes towards, so I suppose I have to get the rotation on Y and compare it to 0 to see if there's a rotation, and then change my object's angle

for adding: what I did was bool variable (like isleft?) and when is left I setted it to true. Then I put a euler angle rotate on a update function with a branch (when isleft is true euler angles y axis (your float value)) this is like a self made to do that not correct at all but it works quite well. Also do that for every movement like isright or if is up or down all what you need. (sry dor my eng between I'm from spain :P)

I see what you mean. I'm not the best on it but what you say sounds nice but idk how to do it. I don't really know how to do that but I have seen a guy on yt that explains it maybe there's something that you can get from there also you can go to discord community is more active there. Here are the links of the videos (1 is the explanation and 2 is the stream of it):


If you don't get like that I think I can help no-more so go to discord and ask or screach on internet or yt there are more tutorials too.

1.

2.

Try this. Player Movement Video I put together. 

Your Horizontal needs to set the rotation 

My Twitch Live Stream will show you how to make a Third Person Controller. 

https://www.twitch.tv/videos/278096919