I'm trying to get a model to rotate to face the direction of where was last clicked on the terrain and then move there. I can get the coordinates of the spot clicked fine and I can make the model move there but I can't work out how to make the model turn to the right direction first. I assume quaternions slerp method would be the one to look at but I'm not sure how to calculate the correct final quaternion. Does anyone have any suggestions as to the easiest way to achieve this?

Thanks,

Adrian

Have you tried to lookAt function in Spatial?

Thanks for the reply. I've looked at that but because it should only be rotating in 2D this doesn't seem to be what I'm looking for. I tried using the lookAt method in Quaternion to calculate the final rotation but I don't get the results I want (it rotates to different amounts according to how far away the spot clicked is).

If you want it to rotate in 2D, you simply control the values you pass in (eg, you could keep the y value of the vector equal to the current world translation's y value)