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.

Dark GDK / Sparkys Raycast Problem

Author
Message
Tv Xxx
17
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 31st Aug 2008 15:43
Ok Its Shooting Bassically,

Ive used

Sc_SetupObject ( 4, 0, 2 ); For My Box Which Is Positioned At The Gun.

and

Sc_SetupCOmplexObject ( 100, 0, 2 ); For My Terrain.

Here Is My Shooting Code



So Is When U Shoot A Collision Is Made, It Tells You Which Object, But It Always Returns 0 (No Collisions)

So Any Ideas>?

Cheers
Tv.

dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 31st Aug 2008 18:50
Quote: "collide == SC_RayCast ( 4, oldx, oldy, oldz, newx, newy, newz, 0 );
"


You should be using the assignment '=' operator here. Also make sure you update the collision(SC_UpdateObject()) for dynamic meshes when they move. Also for raycasting you don't need to setup that object number 4(from the looks of it at least), as the raycasting commands merely take 2 world-space positions(as well as other odd values) and return if they hit anything. The ray itself isn't bound to an object.

Tv Xxx
17
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 4th Sep 2008 17:47
Ok DarkCoder,
got rid of object 4's setup

and my shooting code is now...



Still Nothing.

Login to post a reply

Server time is: 2024-09-30 05:40:43
Your offset time is: 2024-09-30 05:40:43