Hey ! I'm trying to make 3rd person movements like Psychonauts or Ratchet & Clank and my problem is that the rotation of the camera is use to lead the character and I don't understand how I could do that (even in terms of "logic").
My basics movements are based on linear velocity on a RigidBody and support 8 directions movements in the 3D space.
func move_player(speed_x,speed_z, acc, delta):
current_speed.x = lerp(current_speed.x, speed_x, acc * delta)
current_speed.z = lerp(current_speed.z, speed_z, acc * delta)
move_player(0,-speed, acceleration, delta)
move_player(0,speed, acceleration, delta)
I think that I should use the forward vector of the camera (
var forward = -camera.get_transform().basis.z) but I don't know what to do with it...