Search Unity

Parenting Player to moving objects - is that always a bad idea?

Discussion in 'Editor & General Support' started by Hi_ImTemmy, Jan 11, 2021.

  1. Hi_ImTemmy

    Hi_ImTemmy

    Joined:
    Jul 8, 2015
    Posts:
    174
    Hello folks,

    I tried parenting the player to a fixed point on a moving object that follows a spline and found that the player deforms and stretches all over the place.

    Like so.

    Is that to be expected / a common consequence?

    Thanks!
     
    Last edited: Jan 11, 2021
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    Movement has nothing to do (directly) with the scale.

    Do what you're doing to see the undesired effect, then hit PAUSE in the editor and find out what's actually going on.

    It sounds like something does not have identity scaling (1,1,1) in your hierarchy. ALWAYS maintain identity scaling until the very last leaf item in the hierarchy, if possible.

    Also, a moving object isn't really moving in the same way like if you tried to jump on a moving train and hurt yourself. It's just a block of data that WILL be moved next frame by the physic system.
     
    Hi_ImTemmy likes this.
  3. Hi_ImTemmy

    Hi_ImTemmy

    Joined:
    Jul 8, 2015
    Posts:
    174
    @Kurt-Dekker you're spot on. It was a scale issue. The parent object wasn't 1,1,1
     
    Kurt-Dekker likes this.