Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: SammyJoeUK on May 28, 2018, 06:55:33 PM
-
Hey guys/girls,
So I'm working on a project where I need the camera following a player character which rotates when moving in a 3d space. I want the camera to follow the movement of the player but NOT rotate when doing so. Is there any way I can lock rotation in all axis?
Thanks in advance
S.
-
Did you try cinemachine ?
-
I haven't - is what I'm after available in Cinemachine?
-
If you create a parent object that contains the player as the child, the child could rotate while the parent does not. If you set it up so the parent does the translating while the child does the rotating, you can follow the parent, or create another child for more flexibility (ie this 'target child' could change positions at key moments). I like to use 'Move To', ignore vertical for the camera follow. If you create a finish event and connect it to itself, the Move To will be perpetual even when you meet the finish distance. You can adjust move speed to add some play in the movements, like maybe the camera is slower and catches up. 'Target Position' allows you to create an offset, to create desired distance between the player and the camera. Use a vector 3 variable if you want this distance to change at certain moments.
-
Also if you did want to add some rotation or looking at the player, you could apply a look at or smooth look at action in conjunction with the move to.