![]() |
Is there a better way to do these ?
Here's some messy code ....
Code:
if (pBot->strafe_left_time > gpGlobals->time) And the real messy ... Code:
Vector v_direction = pBot->waypoint_origin - pEdict->v.origin; |
Re: Is there a better way to do these ?
Yes
Easy way (but not human-like IMO): separate body angles and view angles - that's what 99% of the bot makers do. Or if you want to continue that way, decrease the movement times. Putting gpGlobals->time + 1.0 means that as long as the waypoint will be in that particular direction, the bot will keep pressing that key, but also as soon as the waypoint turns to be in another direction, the bot will still be pressing the same key for 1 second. Reduce that to 0.2 or 0.1 second (depending on your frame time). You can use these values as reaction times too, like I do. |
Re: Is there a better way to do these ?
Quote:
Is it like the PODBot navigation ? Quote:
|
All times are GMT +2. The time now is 16:41. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.