-
Senior Member
Screen position vector
hey all
i was asking this on todays editor stream:
i used the snapping grid to snap a dummy 3m away from the cam so that its on the screen center. the position should be exactly 0,0,0 right?
the z axis doesnt matter but when i multiply the x and y value with 100000 it should still be 0 (because its snapped)
then i glued the dummy to the cam and moved this glued group with ope. why do i get different position values every time? snapping it to the dl makes no difference.
maybe the whole concept is wrong but i dont get it why its not working the way i did it 
i want to use different hitboxes (head, upper body, arms, legs, wheels etc) that give different points. atm its working with 4 area triggers that move on the dl, but its not working well.
-
Trials Developer
I suppose you're trying to find out if you're aiming at different body parts? You could use this kind of simple logic to find out if the camera is aiming at specific object and convert the numbers to your needs:

The smaller the length datasource gets the closer the target is to the red camera line. It will be still 0 though if the camera is rotated around 180 degrees but this should work for that kind of shooting. The operator order for the vector operations don't matter in this case.
-
Senior Member
thank you mutetus, thats exactly what i need!
omg thats beyond my math knowledge but i think i understand what it does...kinda. works perfectly, thanks!