Hi, i’m new at this but i’ll try to do my best:
I’ve got several arrays of transforms(8 arrays of 30, all instantiated from one prefab) which i modify with several function -moving their vertices, rotations, position, rendering, etc-.
i wanna make a RESET function in order to make all return to their original state (their state just after their initial instantiation). i tried to store the vertices original position, but without success,
Is there any way to say, go back to the prefab-just after cloned state?
// edit!
i dont wanna reset all at the same time, so i was trying to make a function(transform, array) and call it whenever i want.
thanks
function reset (valor:Transform,grupo:Array)
{
for (valor in grupo)
{
var mesh = valor.GetComponent(MeshFilter).mesh;
var groupvertex = mesh.vertices;
for (var i=0;i<groupvertex.Length;i++)
{
Vector3.Lerp(Vector3(groupvertex<em>.x,groupvertex<em>.y,groupvertex<em>.z),Vector3(startPoint<em>.x,startPoint_.y,startPoint*.z), 1);*_</em></em></em></em>
* }*
}