.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Follow the waypoint without looking at it
Old
  (#1)
bomberman
Guest
 
Status:
Posts: n/a
Default Follow the waypoint without looking at it - 04-07-2004

Code:
// keep turning towards the waypoint...

   Vector v_direction = pBot->waypoint_origin - pEdict->v.origin;

   Vector v_angles = UTIL_VecToAngles(v_direction);
in HPB_template 3.0 , I found this code , it make the bot look at the waypoint , how can I make the bot follow the waypoint without looking at it ?
  
Reply With Quote
Re: Follow the waypoint without looking at it
Old
  (#2)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Follow the waypoint without looking at it - 04-07-2004

Create a vector that will be the movement direction (i.e. a vector from the current bot's location to his desired destination).

Convert this vector to a set of angles and use the YAW angle to find the sine and cosine of it.

The sine and cosine can be used in the pfnRunPlayerMove as the forward speed and the side speed arguments.

botman
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com