I am creating a 3rd person controller in ECS, and my camera logic and player movement logic is separated. I want the player look in the direction the camera is facing when it starts moving, but I can’t get it to do that, I have tried everything and haven’t come up with a solution. here is my short code.
angle += math.radians(input.mouseX * input.sensitivity); // Im adding onto angle's value because even if
/// the player isn't moving I still want to recieve input and when the player does move they will be turned to what angle is set to
if (input.moveInput != Vector2.zero) // If player is moving
{
rotation.Value = math.mul(rotation.Value, quaternion.Euler(0, angle, 0)); // if the player is moving turn // the player by angle
}