erasing inbetweensteps wich might be needed still for
"internal" calculations.
No. This function would be called from within a mouse while loop with a wait instruction for calculating other processes. You need to see the rest of the code, (which I referenced in my previous post) in order to understand how it all works.
The SnapIt() function is called inside a while loop for an action which is placed upon the square sprite used to frame the movement of the mouse on the grid.
action Square
{
my.oriented = on;
my.facing = off;
my.decal = off;
my.pan = 0;
my.roll = 0;
my.tilt = 90;
while(1)
{
Mouse3D();
vec_set(my.x, target);
my.z = 0.5;
SnapIt();
wait(1);
}
}
This action also references a Mouse3d() function:
function Mouse3D()
{
var vector1;
var vector2;
vector1.x = mouse_pos.x;
vector1.y = mouse_pos.y;
vector1.z = 5;
vector2.x = mouse_pos.x;
vector2.y = mouse_pos.y;
vector2.z = 5000;
vec_for_screen(vector1, camera);
vec_for_screen(vector2, camera);
trace(vector1, vector2);
}
The exact orientation of the frame will be different because you have a rubiks cube which you can rotate in space.
Other than that Im not sure what "internal calculations" you are talking about and/or why this code makes it impossible for them?