I’m working on a placement system for a personal project of mine. Objects/Models follow your mouse and you can click to “place” the selected item on the plot where your mouse is.
Currently I have the camera lock to a fixed point above the plot looking down, but I don’t want the camera to instantly jump from the player’s third person view to the fixed position. I want it to smoothly transition or “glide” to the fixed point.
I figured the best option would be to tween from the third person view to the fixed point, and back again. The problem is I don’t know how to go from the fixed point back to third person without any camera snapping when I switch the CameraType back from Scriptable. I’m not asking anyone to script this for me, I just need some suggestions/somewhere to start.
I appreciate the info, but I know how to use TweenService.
What I don’t know is how to manipulate the camera out of the player control to the fixed point and back without any snapping. When you set the CameraSubject/CameraType it will jump the camera back to the payer’s head.
No. I set the camera to Scriptable so it would be not-controllable. If I use TweenService I’m sure you can tell the issue would be knowing where to tween the camera back to so when I unset the CameraType from Scriptable it doesn’t make a small snap/jump/teleport.
Here’s a potential solution:
Right before the camera starts moving to the plot, you can store the current position. That way, you can tween the camera back to that same position and then turn off scriptable camera after the tween is finished.
If you know where the camera would be located when it switches back to 3rd person, you can tween to that and then switch modes. Store the CFrame of the camera when it switches to the fixed point, and use that CFrame as a reference for when it returns to 3rd person.
However, if the player have moved when the camera is fixed, you will need to calculate the 3rd person mode camera position manually.