AC Ver: 1.73.2
Unity Ver: 2019.4.18f1
Hello,
I have a child gameobject. I want to record it's global position, unparent it, and set its global position to where it previously was (i.e. I don't want it to end up at 0,0,0 - which is what seems to happen when the parent is cleared)
The problem is it's always ending up at 0,0,0
Here are the actions I'm using:
My logic is:
1) Record the global position to an AC variable
2) Clear the parent
3) Use the stored variable in a teleport / transform action to reposition the gameobject
AC appears to be correctly recording the global position into the variable:
However regardless if I use a teleport or transform action the object is still at 0,0,0 when logged with transform.localposition
& transform.position
What am I doing wrong?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
My bad. Using Object : Set Parent to clear the parent doesn't put the object to 0,0,0. It seems an animator I have on the child is messing things up.