Search Unity

Question Copying Rotation Values Error, please help

Discussion in 'Editor & General Support' started by beeb102, May 1, 2023.

  1. beeb102

    beeb102

    Joined:
    Apr 15, 2019
    Posts:
    1
    FIX?: I posted on the Ludum Dare page as well and a user suggested I use "Transform.localEulerAngles" instead of using "Transform.Rotation" and this FIXED IT. So, idk Unity might still need to fix this but here is a work around.

    Hi, I just need to copy the rotation values from one object and put them on another but it keeps taking values like "120" and then improperly copies them to the other object as "0.0124". This appears to be a known problem with children objects here on this forum.

    There was no solution found on that forum post other than grabbing the values from the editor through script, which allowed my game to work only in the editor. However, you can't compile a game using code that takes values from the editor this solution doesn't work. I'm trying to do Ludum Dare and I've been stuck on this for hours, I can't separate the child object from the parent since it's the main purpose of my project.

    Any solutions would be great, doubting it but never know.
    Thanks.
     
    Last edited: May 1, 2023
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,735
    tsukimi likes this.