View Single Post
Re: How to do correct movement
Old
  (#39)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: How to do correct movement - 11-01-2005

I'm having trouble getting bots to face something, they never turn to look at anything when I set the cmd.viewangles to the angles I want. Is there something I'm missing? I'm using SteveC's CBasePlayer way of issuing a command:

PHP Code:
void CBot :: runPlayerMove()
{
    static 
CUserCmd cmd;

    
//////////////////////////////////
    
memset(&cmd0sizeof(cmd));
    
//////////////////////////////////
    
cmd.forwardmove m_fForwardSpeed;
    
cmd.sidemove m_fSideSpeed;
    
cmd.upmove m_fUpSpeed;
    
cmd.buttons m_iButtons;
    
cmd.impulse m_iImpulse;
    
cmd.viewangles m_vViewAngles;
    
    
CBasePlayer *pPlayer = (CBasePlayer*)CBaseEntity::Instance(m_pEdict);
    
// SteveC : CBasePlayer user command
    
pPlayer->ProcessUsercmds(&cmd,1,1,0,false); // SteveC


the bots move okay though, they just won't turn at all ?
  
Reply With Quote