Topic: Stage Centre
Ive been messing around with z-axis movement, which means I have to limit the players differently than vanilla UFE.
I want to give them a circular movement (ring) from the stage centre.
Vector3 stageCentre = Vector3.zero;
float radius = UFE.config.selectedStage.ringRadius;
float dst = Vector3.Distance(stageCentre, transform.position);
if (dst > radius)
{
Vector3 vect = stageCentre - transform.position;
vect = vect.normalized;
vect *= (dst - radius);
transform.position += vect;
}
This is okay-ishg, but Im not sure that it's quite right. Is Vector3.Zero the centre of the stage, also, can I access the starting positions of the players from PhysicsScript.cs?
subtracting the tow starting Vectors would give me an ideal centre point to limit their movement from.