Hello there, please tell me what I'm doing wrong... I'm trying to ratate the camera around the player on Y axis using mouse movement. This is what I came up with after lots of searching (came up with is a strong statement as realy I copy pasted this): `
rot_angle : Vector2 = GetMouseDelta() * GetFrameTime()
csx : f32 = math.cos(rot_angle.x)
snx : f32 = math.sin(rot_angle.x)
tx : f32 = camera.position.x - player_position.x
tz : f32 = camera.position.z - player_position.z
nx := (tx * csx - tz * snx) + player_position.x
nz := (tx * snx + tz * csx) + player_position.z
camera.position = {nx, camera.position.y, nz}
camera.target = player_position`
camera sort of rotates around the player but it doesn't follow the player, just stays at the same possition. So when I move the player it gets further and further away from camera. What stupid am I doing?