Megalomaniak
Hi there quick question, I just realized that the direction you move in is not based on the camera direction.
I've tried a couple of things, I was gonna try vector3.Forward and just use the camera position until I realize that from my knowledge, it isnt possible (or well I cant figure it out it probably is possible but what would I know).
So here I am asking for help!
How I have it now the camera is rotated only on the X and Z access where as the Y is rotated in another node, this node being the parent of the camera but the child of the player:

Anyhow this is how I am currently moving the player:
func _physics_process(delta):
# movement -----------------------------------------------------------------Â
var direction = Vector3.ZERO
if Input.is_action_pressed('WalkRight') :
direction.x += 1
if Input.is_action_pressed('WalkLeft') :
direction.x -= 1
if Input.is_action_pressed('WalkBackwards') :
direction.z += 1
if Input.is_action_pressed('WalkForward') :
direction.z -= 1
if is_on_floor() and Input.is_action_just_pressed("Jump") :
targetVelocity.y = jumpImpulse
if direction != Vector3.ZERO :
direction = direction.normalized()
$Pivot.look_at(position + direction, Vector3.UP)
targetVelocity.x = (direction.x * speed) * GameValues.gameSpeed
targetVelocity.z = (direction.z * speed) * GameValues.gameSpeed
if not is_on_floor() :
targetVelocity.y = (targetVelocity.y - (fallAcceleration * delta)) * GameValues.gameSpeed
velocity = targetVelocity
move_and_slide()
As we can see I just add to either the X or the Z or whatever, but obviously that isnt going to work but I currently dont know a way to do otherwise, if you do know a way please tell me, I've already spent 30+ minutes researching this topic but nothing so far.
Thanks so much!