Hi , I am very new to Babylon and Unity . I want to rotate my character towards a given point where he is supposed to reach while running . I am able to rotate the character towards the direction of movement in unity . But not via BabylonJS.
here is the piece of code that I wrote -
public void moveTowards(Vector3 a , Vector3 b )
Quaternion toRotation = Quaternion.LookRotation(b-a,Vector3.up);
transform.rotation = Quaternion.RotateTowards(transform.rotation,toRotation,rotationSpeed*Time.deltaTime);
Please help me write the equivalent BabylonJS function or suggest me some other way to do it ? I tried several answers but none helped .