Search Unity

problem with setting rotation

Discussion in 'Editor & General Support' started by Shadowing, Jul 14, 2019.

  1. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    I'm having a issue where im taking a transform (Spawn Point) getting the eulerAngles and then setting the EulerAngles on the character that spawns.


    Code (csharp):
    1.  
    2.  
    3. Vector3 SpawnPointRotation = SpawnPoint.eulerAngles;
    4.  
    5. SpawnedCharacter.eulerAngles = SpawnPointRotation;
    6.  
    7.  
    This gives wrong rotation results.