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 / movement seeking

Author
Message
me_coder
20
Years of Service
User Offline
Joined: 24th Jan 2004
Location:
Posted: 9th Mar 2004 21:06
in dbc how do u get an object to automaticly fid its way around another object in its way?

Mwaaaahhhhhaaaaahhhhaaaahhhhhaaaahhhhaaaa I need blood
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 9th Mar 2004 21:07
its called pathfinding, its a huge topic of discussion, search google, and these forums for it, and no doubt you'll find countless resources on it.

In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit http://redeye.dbspot.com
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 11th Mar 2004 23:16
if you just want to avoid something small then make the object "walk" in a half circle and then point it at the destination again, eg

collided:
turn object left 1,90
for i=1 to 180
move object 1,turndiam/180
turn object right 1,i
next i
point object 1,destx,0,destz
return

is a simple subroutine that just makes the object walk around any obstruction at a fixed radius, this example is untried, it ignores collision while it is walking around an obstruction and stops the rest of the program running, but will work ok on a sparsley populated map, if you want a more fanciful avoidance routine then you can re-write the code so that it does the walkaround in stages during the execution of the rest of the code and if it hits something then it can retrace it`s steps and try the other way around, and if that fails then it could try a larger radius, hope thats some help.

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, ATI radeon 9800 pro gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
me_coder
20
Years of Service
User Offline
Joined: 24th Jan 2004
Location:
Posted: 14th Mar 2004 14:00
thats no quite wat i want, the object is in an enclosed area (a maze) that has random corners in it and has to find the right way to go when it hits the wall in front of it. (you have know control over the object)

Mwaaaahhhhhaaaaahhhhaaaahhhhhaaaahhhhaaaa I need blood
bibz1st
21
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 14th Mar 2004 15:17
are all the walls of the maze at the same Y angle as each other?
me_coder
20
Years of Service
User Offline
Joined: 24th Jan 2004
Location:
Posted: 21st Mar 2004 19:40
no

Mwaaaahhhhhaaaaahhhhaaaahhhhhaaaahhhhaaaa I need blood

Login to post a reply

Server time is: 2024-09-22 02:40:01
Your offset time is: 2024-09-22 02:40:01