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 Physics & Dark A.I. & Dark Dynamix / help on AI ADD OBSTACLE FROM LEVEL

Author
Message
X_MEN
20
Years of Service
User Offline
Joined: 14th Sep 2003
Location:
Posted: 7th Jun 2009 21:24
can anyone help me to get OBSTACLE BOUNDS collision to work from a x file when loaded using AI ADD OBSTACLE FROM LEVEL

You can do it if you try
Orion1024
15
Years of Service
User Offline
Joined: 7th Mar 2009
Location: Dimensional Coordinates: 323.935.914.157
Posted: 9th Jun 2009 08:59
For whatever reason, I couldn't get the 'AI Add Obstacle From Level' command to generate any obstacle data for my terrain. I fiddled around with the parameters and still nada. So, I had to write another program to detect the edges of obstacles and save the coordinates to a file. In my game, I load in the file and use 'AI Add Obstacle Vertex' command to generate the obstacles.

Looking for the vortex to another Earth
Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 9th Jun 2009 13:19
I haven't used DarkAI much, so I apologise in advance if this is all useless. Have you tried changing the parameters of AI ADD OBSTACLE FROM LEVEL?

The command effectively generates an infinitely large Plain object, lying in the XZ plain, at a y-coordinate of PlainHeight#. If that Plain misses your Level Object, then it won't find any obstacles at all.

The only other thing I can think of (and this is probably a really stupid question) is - did you remmeber to call AI COMPLETE OBSTACLES after generating your collision data?

Oh and Orion1024 - if by terrain you mean a gently rolling landscape then I think I know why it didn't work. According to the help files, DarkAI only recognises a piece of a level as an obstacle if it slants up from that XZ plain at an angle of more than 45 degrees, which is pretty steep!

Hope this helps!

"I wish I was a spaceman, the fastest guy alive. I'd fly you round the universe, in Fireball XL5..."
Orion1024
15
Years of Service
User Offline
Joined: 7th Mar 2009
Location: Dimensional Coordinates: 323.935.914.157
Posted: 9th Jun 2009 15:15
Yeah, I tried changing the various parameters of the command and I did have some hills with steep sides that met the angle criteria and still nothing (the output file was empty as well). My 'terrain' is a .x file I exported from TED. I'm certainly no Dark Basic guru, so maybe it's something I was doing wrong.

Looking for the vortex to another Earth
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 15th Jun 2009 13:27
try using something like

for plainheight=0 to 50
ai add obstacle from level bla bla bla plainheight bla
next plainheight

I want robotic legs.

Login to post a reply

Server time is: 2024-04-25 15:03:10
Your offset time is: 2024-04-25 15:03:10