MCPcopy Create free account
hub / github.com/assaultcube/AC / AimToVec

Method AimToVec

source/src/bot/bot.cpp:133–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void CBot::AimToVec(const vec &o)
134{
135 m_pMyEnt->targetpitch = atan2(o.z-m_pMyEnt->o.z, GetDistance(o))*180/PI;
136 m_pMyEnt->targetyaw = -(float)atan2(o.x - m_pMyEnt->o.x, o.y -
137 m_pMyEnt->o.y)/PI*180+180;
138}
139
140void CBot::AimToIdeal()
141{

Callers

nothing calls this directly

Calls 1

GetDistanceFunction · 0.85

Tested by

no test coverage detected