Hello I’m on a games course and I’m struggling with something…
Basically I’m trying to create an endless runner, I’ve got it set up so that the platforms all generate from an object-pool with an empty child-object on there ends that will (in theory) act as a “socket” for the next track.
I want the platform/parent to be able to have an internal int equal the value of the of the child’s vector X.
Grabbing hold of the object’s value directly is not an option.
I’ve managed to come quite far with object pooling and such but I can’t find anything on this, so I’d really appreciate any help offered.
public Vector3 vectorPosition;
void Update ()
-
{*
-
CountDown();*
-
AutoMove();*
-
WheresMyBaby();*
//^^I call the function here (just to check that it works (which it doesn’t)) -
}*
*//<<<Some functions regarding movement and object activation go here… *
public void WheresMyBaby()
- {*
- vectorPosition = GetComponentInChildren().WhatsMyVector();*
- //^^I’ve got this non working device currently, the idea being that I my script…*
//attached to the vector will “reply” with its coordinates - }*