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.

Geek Culture / Nuclear Glory Question

Author
Message
Hoss
20
Years of Service
User Offline
Joined: 7th Jun 2004
Location: Someplace with a PC
Posted: 22nd Jul 2004 21:17
I didn't think this fit into any other category, so i'll post here (mods, feel free to move it if necessary). I am trying to use raycasting in my game, but for some reason, my ray doesn't show up and work.

if mouseclick() = 1
rhit = RayIntersectObjectPRO(fieldOBJ,1,1.5, 10, 1.2, 1.5, -10, 1.2)
if rhit=1 then cls:print "YAY":

YAY never gets printed even if the ray hits the fieldOBJ

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd Jul 2004 22:43
Firstly, the Ray won't "show up", it doesn't create an object, it's a concept.

Secondly...have you SYNCed after the code you've pasted in above?

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 23rd Jul 2004 00:48
Are you sure the ray is hitting the object as well?

Do you have any SetCollisionsPRO() statements defined? You're testing your object as an ellipsoid, so it's a requirement that your object is defined as an ellipsoid first.

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
Lightwave Scene Exporter to .X also at: http://www.nuclearglory.com
Hoss
20
Years of Service
User Offline
Joined: 7th Jun 2004
Location: Someplace with a PC
Posted: 23rd Jul 2004 00:54 Edited at: 23rd Jul 2004 01:02
Yes, I have used SetCollisionsPRO, and I am sure the ray is hitting the object. And yes, I have synced after the code.

Jimmy
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 23rd Jul 2004 02:32
Thirdly, who said you could be a DBP Fanboy??


<Mnemonix> im seroulsiy frunk to doaty
http://www.dbspot.com/ - Free website hosting. Fast and reliable... probably.
Hoss
20
Years of Service
User Offline
Joined: 7th Jun 2004
Location: Someplace with a PC
Posted: 23rd Jul 2004 05:47
lol Jimmy, I went to the site....and I figured I could since I did design that site for ReD_eYe

nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 23rd Jul 2004 06:34
Should you be testing the wall as a mesh? Most walls don't fit into an ellipsoid very well.

Try code layout like this:



Notice the use of number 2 (or TYPE_NGC_MESH) as the second parameter of the RayIntersectObjPRO() command. This matches the setting in our SetCollisionsPRO() statement because the 2nd type (type_walls) is defined as a mesh.

You probably just missed one of those setup steps for your wall. If you prefer the wall to be tested as an ellipsoid, then change the SetCollisionsPRO() statement to ellip_2_ellip and the raycast command to TYPE_NGC_ELLIP.

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
Lightwave Scene Exporter to .X also at: http://www.nuclearglory.com
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 23rd Jul 2004 19:57
Technically, i designed that site, as i made it from scratch myself. The template you've done for me is good, but i'm currently looking to finish something so i have content to put on the template...

So i guess you can keep the sig for now...


DBP Fanboy is a Unregistered trademark of ReD_eYe uninteractive, no rights reserved.
http://redeye.dbspot.com/fanboy.html

Login to post a reply

Server time is: 2024-11-11 13:44:15
Your offset time is: 2024-11-11 13:44:15