Hey, I'm having some problems with Sparky's Collision, i go to shoot the ray and it shoots it correctly, but at the wrong angle, it shoots in one direction, no matter what direction i'm facing, i know that it don't update the angle of the raycast based off of the object's angle but i want to know how i would achieve this in a first person enviroment.
My raycasting code.
Range# = 100.0
If Sc_Raycast( 2 , Object Position X(1) , Object Position Y(1) , Object Position Z(1) , Object Position X(1) , Object Position Y(1) , Object Position Z(1) and Mouseclick()=1
Range# = Sc_GetCollisionDistance()
if object exist(3) = 0 then make object plane 3,5,5
color object 3,RGB(255,0,0)
position object 3,object position x(1),object position y(1), Range#-0.1
else
delete object 3
Endif