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.

Newcomers DBPro Corner / Tryig to get a Handle on this Intersect Object thing

Author
Message
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 6th Jun 2005 09:00 Edited at: 6th Jun 2005 11:45
I'm taking my first stab at doing intersect object collision for polygonal pcollision as suggested by many now that I've written a guide to help me understand it. Incase you don't know the process you basically send out an intersection ray to every object in the world and check to see if the distance from that object to you is right infront of you, if so disallow movement.

I assume this would lag up the game looking for every object in the world, so to reduce lag I'm:

- Only sending the rays to objects within a 100 WU radius
- Only sending the rays out when I'm moving

So am I going about this properly? So far I made a quick little program that sends a ray to a box in the world, and checks if the distance recieved by that ray is equal to half of your width, if so reposition you to your last well known coordinates. It works pixel-perfectly so now Im going to attempt at expanding this to every object. Is there a better "tried and true" method for this or is this correct?

<EDIT> Look at my most recent post, I still need help <>

Your signature has been erased by a mod because the filesize was too large.
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 6th Jun 2005 09:14
RUCCUS,

I believe you have a well method.


+NanoBrain+
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 6th Jun 2005 09:23 Edited at: 6th Jun 2005 11:44
w00t

<EDIT> I think people might be reading this post and just leaving because it seems I solved my problem...if thats the case please realize I didn't, look below.

Your signature has been erased by a mod because the filesize was too large.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 6th Jun 2005 09:26 Edited at: 6th Jun 2005 09:31
Damn I just realized this wont work if I make a large open room...I'd have to divide the room up into each wall. Oh shoot this isnt polygonal detection because its detecting half of your width...Im gona need to work on a formula...wohoo!

<EDIT> New question:

- Is there any way to detect if something interupts the intersection ray?

Basically Im thinking if I had a limb attatched to the user 100 WUs away, invisible ofcourse, and then sent an intersection ray to that limb and checked to see if something interupted the limb and where this interuption occured (at what world position) then I could see if that world position is right infront of me. If so reposition accordingly. Any ideas?

Your signature has been erased by a mod because the filesize was too large.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 7th Jun 2005 01:50
Nevermind I figured out what to do, look forward to a snippet coming out soon. Thread closed.

Your signature has been erased by a mod because the filesize was too large.

Login to post a reply

Server time is: 2024-09-23 21:23:28
Your offset time is: 2024-09-23 21:23:28