I have a turret that slowly rotates towards a target. The game is 2.5D and is oriented along XY axis with Z as "up".
This was the original code which worked great, but was for XZ axis with Y up.
I've changed the up vector in the CreateWorld to every Vector3 direction and it still doesn't orient correctly. The turret lays in random directions. The model is oriented correctly as it looks great before applying the new Slerp rotation. The closest I can get it to work in a desired direction is changing the 'up' argument to my targetRotation and my 'forward' argument to Vector3.Forward.
Vector3 targetRotation = Vector3.Normalize(target.position - myPosition);
myRotation = Quaternion.Slerp(myRotation, Quaternion.CreateFromRotationMatrix(Matrix.CreateWorld(myPosition, targetRotation, Vector3.Up)), delta * 3f);
Unfortunately I currently don't have a fantastic understanding of matrices and quaternion. Thanks