Hello! i am currently making a program to build up and knock down blocks, simple but fun i have gotten pretty far but have hit a snag.
so far i have it so when i click i creates a block at the position i am looking at on either another block, or the ground, this is achieved through the use of ray tracing from the camera and creating a block at a Vector3F created from the collision between the ray and the other object, what i cant do is round the Vector3F so that the numbers are all single digit integers. does anyone know how to achieve this?
thanks in advance
something about:
[java]
Vector3f v = …;
v.set(Math.floor(v.x), Math.floor(v.y), Math.floor(v.z));
[/java]
Thank you! worked