Hey
How can i Clear the Camera or Vector3 Position for the next transfer.position?
in anther words,
I want to make a Jump from A to B Clear the Positionsinformation to make an new Jump from B to C. Whitout a memory effect.
Can you help me?
Hey
How can i Clear the Camera or Vector3 Position for the next transfer.position?
in anther words,
I want to make a Jump from A to B Clear the Positionsinformation to make an new Jump from B to C. Whitout a memory effect.
Can you help me?
Just assign a new Vector3 value to your variable, or to your transform.position. The old values will be forgotten. Memory issues doing this will not be a problem.
If, on the other hand, you want to remember a Vector3 (such as a position) before assigning a new value, you'll need to create a new variable to contain it, eg:
// store old position
var oldPosition = transform.position;
// assign new position
transform.position = newPosition;
// then later, we can recall the old position
transform.positino = oldPosition;
Does this answer your question? (it's a little hard to understand).
If neither of these suggestions answers your question, you'll need to be clearer about what you want, and you'll probably need to post the code that you're using.
This is my Script! were do i you script to do?
function OnGUI () {
if (GUI.Button (Rect (6,80,120,20), "Home")) {
transform.position=Vector3 (-10,10,-15);
}
if (GUI.Button (Rect (6,105,120,20), "Rock/Pop")) {
transform.position=Vector3 (1239,10,-153);
}
if (GUI.Button (Rect (6,130,120,20), "Latin/Reggae")) {
transform.position=Vector3 (959,10,-152);
}
if (GUI.Button (Rect (6,155,120,20), "HipHop/Rap")) {
transform.position=Vector3 (682,10,-138);
}
if (GUI.Button (Rect (6,180,120,20), "Soul/R&B")) {
transform.position=Vector3 (408,10,-136);
}
if (GUI.Button (Rect (6,205,120,20), "Jazz/Swing")) {
transform.position=Vector3 (1232,10,123);
}
if (GUI.Button (Rect (6,230,120,20), "Metal/Gothic")) {
transform.position=Vector3 (957,10,123);
}
if (GUI.Button (Rect (6,255,120,20), "Cover/Double")) {
transform.position=Vector3 (682,10,115);
}
if (GUI.Button (Rect (6,280,120,20), "Deutsch/Schlager")) {
transform.position=Vector3 (404,10,114);
}
}