hello I would like that when I move the mouse to the right or left, that the character and the camera moves with in the direction synchronously. unfortunately I have not a real solution, because I always have problems with the Camera , and how could i make the characterBody3d control even more fluid.
#Mouse Rotate Character and Camera
26 messages · Page 1 of 1 (latest)
is there something that speaks against this setup?
I just threw this together and the camera is perfectly locked onto the player and rotates synchronously
The question is, do you need that camera to move around at other angles?
i only need the third person
can you give me a example of a camera you are trying to replicate? Should it be a fixed camera with only zoom and rotation around the y axis like in Runescape?
Or should it be free-look like Witcher
wait i watch
something like witcher yes
but i think it would be bette if the camera fixed but only rotate the y only and the same range
okay, then it's a good idea to detach the spring arm from the player and attach it to a seperate Node3D which you rotate around to your liking
if you want a fixed angle and only y rotation, you can copy my solution :)
okey i script now and watch
Just as a heads up: If you want a camera like witcher, you can use this setup:
The RemoteTransform3D pushes it's position onto CameraPivot so the camera follows the player's position. You then attach a script to the Camera Pivot that handles the rotation (handles mouse input, rotation clamps and other attributes you want to have)
If you want the player to influence the camera rotation from time to time, you can activate the "Push Rotation" option inside the Remote Transform. A scenario for that could be: Player is not moving, so the camera moves freely. As soon as the player starts to move, push rotation is activated and the camera locks onto the player with fixed rotation dictated by the player.
if this works i m so happy xD
XDD
Try the first setup as it's the easiest. If you want more freedom, try the second setup and add the desired behavior on top :)
i only need to write the script right xD
Funny enough: For the first setup, the camera doesn't need a script at all (for basic camera-follows-player)