Is it possible to flip (on the x-axis) the child objects of the player without going through and individually going through all of them?
1 Answer
1If you set the transform x scale to -1 on the parent, this will flip the parent and all of its children.
transform.localScale = new Vector3 (-1, 1, 1);
This effectively flips everything on the parent’s y-axis. So if any child has an x offset, that offset also gets flipped here.
Depends on what you mean by flip You could parent all items you want to flip to a dedicated game object, which is parented to the player. Then adjust the local scaling of that dedicated game object. This will then affect the lossy scaling of all child items. You could then also rotate the dedicated game object 180 degrees to face the opposite direction.
– ArachnidAnimal