Looking at the initializer animation from my old energy ball project, I don’t see anything related to the SDF position.
There is, however, a function attached to the player object that controls the position of the body:
void SetControllerParents()
{
if (bodyObj.tag == "BothState")
{
leftEmitterObj.transform.parent = leftParent;
rightEmitterObj.transform.parent = rightParent;
}
else if (bodyObj.tag == "LeftState")
{
leftEmitterObj.transform.parent = leftParent;
rightEmitterObj.transform.parent = leftParent;
}
else if (bodyObj.tag == "RightState")
{
leftEmitterObj.transform.parent = rightParent;
rightEmitterObj.transform.parent = rightParent;
}
else if (bodyObj.tag == "NoneState")
{
leftEmitterObj.transform.parent = wayOut;
rightEmitterObj.transform.parent = wayOut;
}
else
{
Debug.LogError("Shouldn't be here! Body object tag not found.");
}
leftEmitterObj.transform.localPosition = Vector3.zero;
rightEmitterObj.transform.localPosition = Vector3.zero;
}
This function is called from the very first frame of initialization, and my theory is that since the camera doesn’t recognize the hand positions, we actually start the body at “wayOut”, which is exactly what it sounds like: a transform positioned really far away from the camera.
The position of this transform corroborates my theory, since in the initialization clip I shared in yesterday’s log, the body comes into frame from above.
Many times over the course of my ongoing endeavor to improve this energy ball experience, I’ve been reminded that a significant amount of my success in making V1 look so natural was sheer luck. I believe wholeheartedly that luck gracefully guides one who desires to create with pure intentions; and so, I guarantee that I did not intentionally create this amazing effect. Instead, upon first witnessing it, I probably chuckled and thought, “If it ain’t broke, don’t fix it!”