vector@cdir;
vector@raydir;
matrixcamMatrix = optransform(chs("camera"));
//get a matrix with the camera's transforms.@cdir = cracktransform(0, 0, 0, {0,0,0}, camMatrix);
//extract out the camera position as a vector@raydir = normalize(@P-@cdir);
//get a vector to project pointo from camera
…In the “Camera” channel, I placed “/obj/Cam_01” and set my wrangle to detail but I'm not getting any values. Am I missing something?
Ok, not sure what I did wrong but I fixed it. I had changed the name of a vector to make it more friendly and it broke something. I copy/pasted the script without edits and it now works.
I'm glad it helped I'm pretty sure there's a more direct or cleaner way to get the camera position, if anyone knows a better trick let us know, in the meantime at least this gets the job done, cheers. - AM