I’m translating my code from unity 3d in to stride 3d and I have problem translating it.
this code does that player is rotating around the planet without south pole maddness.
PlanetDirection = Planet.position - transform.position;
// Align to planet without south pole maddness :)
planetDistance = Vector3.Distance(transform.position, Planet.position);
Ray ray = new Ray(transform.position, PlanetDirection);
RaycastHit hit;
Debug.DrawRay (transform.position, PlanetDirection);
if (Planet.GetComponent<Collider>().Raycast(ray, out hit, planetDistance) ){
transform.rotation = Quaternion.LookRotation( Vector3.Cross(transform.right, hit.normal) , hit.normal);
}
can anybody help me here