use of org.asassecreations.engine.math.vector.Mat4 in project Voxel_Game by ASasseCreations.
the class BlockRaycast method worldSpace.
private static final Vec3 worldSpace(final Vec4 eye) {
final Mat4 intertedView = Mat4.invert(GameCamera.view, null);
final Vec4 world = Mat4.transform(intertedView, eye, null);
final Vec3 ray = new Vec3(world.x, world.y, world.z);
ray.normalise();
return ray;
}