I want something like this
private void Start()
{
// The euler angle
Vector3 angle = new Vector3(0, 90, 0);
// The forward direction with that rotation
Vector3 direction = Singularite(angle);
// This is just used to print the result
Debug.Log(direction.ToString());
}
public Vector3 Singularite(Vector3 eulerAngles)
{
// Do the math here, I can't find the correct one and that's what I'm searching
}
The result must be
(1, 0, 0)
EulerAngles in this means rotation in Vector3, Forward Direction here means I want a singular direction in Vector3
I can just make a new gameobject and assign the eulerAngles to the transform and then getting the tranform.forward of it. But it’s not optimized. (I tried to go to definition for transform.forward but it leads to no code to be found.)
and so on, I need to do it with various of eulerAngle, that’s why I tried to make a function for it.
and I don’t know the exact method on how to do that. Can someone help me?