Making an FPS game as a learning project, and I'm trying to add the ability for the player to kick physics bodies. I'm doing this with Area3D in front of the player to represent where their foot hits during the kick, only having monitoring enabled for the area during the kick.
My code:
func _on_kickbox_body_entered(body):
if body is RigidBody3D:
body.apply_central_impulse(Vector3(?, 2, ?))
My question is how to get the X and Z parts of the vector so that the Vector3 points in the direction that the player is looking