Ok. I'm having some difficulty with Sparky's ray cast. I'm using the latest Dark Physics, and trying to use Sparky's ray cast(as DP's rays don't work). What is happening is Sparky's rays will only cast one ray, and only cast said ray once. I know this because I printed yob and ycol to the screen. yob indicates an initial collision with obj 495(correct) and ycol indicates an initial distance of 103(correct), but if I move around, the values don't change, even though new sets of Cartesians are being fed in. I don't see why the ray cast for Sparky's demo works perfectly, and mine doesn't.
My code:
function playerphy()
yob=sc_raycastgroup(1,pcx#,pcy#+3,pcz#,pcx#,pcy#-1000,pcz#,0)
ycol#=sc_intersectobject(yob,pcx#,pcy#+3,pcz#,pcx#,pcy#-1000,pcz#)
endfunction
This is the ONLY code involved in the function
Here are the variables:
pcx,y,z-player position
yob-determines the object the ray intersects
ycol-the distance between the two objects
Here's the deal. All of the variables are correct. I know that the ray is giving me the correct info. What I want to know is: Why can I only cast one ray and then no more?
I'm sorry if this is a lot to take in. Also, I have meticulously went through commented out everything except this function to see if another function or section of code was causing the issue. Then I painstakingly temporarily disabled Dark Physics, no change. I know that there is an issue with one of these two lines.
Basically, if I could cast more than one ray, the program would work perfectly(for now).
Thanks,
-Amo.