Hey Guys,
I try to simply rotate my entities towards a target in a smooth way, but using local or world rotation, my entity deforms during rotation.
Normally this happens when one tries to rotate a scaled object, but i have a parent empty entity which is not scaled or rotated at all... heres my rotation code:
public void RotateToTarget(float deltaTime) {
var rotTarget = Quaternion.LookRotation(moveTarget.ValueRO.position - unitTf.WorldPosition, unitTf.Up);
unitTf.WorldRotation = Quaternion.Slerp(unitTf.WorldRotation, rotTarget, speed.ValueRO.angular * deltaTime);
}