.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   how to determine look up or down on ladder (http://forums.bots-united.com/showthread.php?t=2347)

Whistler 23-07-2004 01:40

how to determine look up or down on ladder
 
I have some problems with determining whether bot should look up or look down when climbing the ladder, since I've found sometimes I look up and push forward it will actually move _down_. But in which case this will happen ?

Thanks

Pierre-Marie Baty 23-07-2004 14:48

Re: how to determine look up or down on ladder
 
how so ?
if the destination waypoint is higher than the source waypoint, make the bot look up, if the contrary make it look down...
But note that you must FACE the ladder to move up when pressing forward. If you have the back at it, you will move DOWN when pressing forward. So make (temporarily) the x and y origin of the destination waypoint in the center of the ladder so that you're certain that the bot will face the ladder.

Whistler 24-07-2004 06:36

Re: how to determine look up or down on ladder
 
1 Attachment(s)
Quote:

Originally Posted by Pierre-Marie Baty
But note that you must FACE the ladder to move up when pressing forward. If you have the back at it, you will move DOWN when pressing forward.

that's what I mean. but it isn't always that if you have the back at it you'll move down. sometimes it also moves up.
and like this picture, when you want to climb up the ladder to the platform you have to not face the ladder...

Pierre-Marie Baty 25-07-2004 23:52

Re: how to determine look up or down on ladder
 
not true :)

You can still climb that ladder by facing it all the time and strafe left to get out of it when you've reached the top... and this is usually what I do.

In fact the ladder code works like this:
-if you face the ladder AND your pitch is > to -45 degrees, FORWARD will go UP
-if you face the ladder AND your pitch is < to -45 degrees, FORWARD will go DOWN
-if the ladder is on your left, STRAFE LEFT will go UP (no matter your pitch)
-if the ladder is on your right, STRAFE RIGHT will go UP (no matter your pitch)
-if you have the ladder in the back AND your pitch is > to +45 degrees, FORWARD will go UP
-if you have the ladder in the back AND your pitch is < to +45 degrees, FORWARD will go DOWN
the opposite of the mentioned keys do the opposite movement. When talking about pitch, + means up and - means down (I'm not sure it's like that in the HL engine, actually I think it's the contrary).


All times are GMT +2. The time now is 21:59.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.