Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Sparky's DLL(ray cast issue)

Author
Message
Non Sequitur M
16
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 31st Jan 2013 05:54
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:

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.
Non Sequitur M
16
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 31st Jan 2013 19:58
Solved. I was using the spawn point for the character rather than the updated current values. Now it runs fine. It wasn't casting the ray once, it was casting it at the same point. Thank you to anyone who was going to help.

-Amo.

Login to post a reply

Server time is: 2024-11-23 07:55:45
Your offset time is: 2024-11-23 07:55:45