u can create a line
- from enemy's head
- to yaw / pitch point with some distance u specify
send this to intersectsegment and check if visible && hobjImpact equals to your object
Originally Posted by I2espect
u can create a line
- from enemy's head
- to yaw / pitch point with some distance u specify
send this to intersectsegment and check if visible && hobjImpact equals to your object
Now this is helpful. I would create variables for Query and Info, but how to specify the
yaw and pitch? I can do it by position. Am I in the right path?
What do u mean how to specify yaw.pitch..
U read them from the player class
And u calculate d3dxvector3 point (toPos in the query)
Originally Posted by I2espect
What do u mean how to specify yaw.pitch..
U read them from the player class
And u calculate d3dxvector3 point (toPos in the query)
So it is like this?
Code:
oIntersectSegment = (IntersectSegment)(aIntersectSegment);
iQuery.m_From = TargetPos;
iQuery.m_To = MePos;
oIntersectSegment(iQuery, &iInfo);
if(iInfo->hObjImpact == Me->Object) //Returns true if aiming at me
Originally Posted by vaisefud3
So it is like this?
Code:
oIntersectSegment = (IntersectSegment)(aIntersectSegment);
iQuery.m_From = TargetPos;
iQuery.m_To = MePos;
oIntersectSegment(iQuery, &iInfo);
if(iInfo->hObjImpact == Me->Object) //Returns true if aiming at me
No not what i meant.. m_from correct but m_to not
M_to is the point where the enemy is aiming
Originally Posted by I2espect
No not what i meant.. m_from correct but m_to not
M_to is the point where the enemy is aiming
And that's my problem, how to get it. You mentioned pitch and yaw but I never seen to get a location from them.
Originally Posted by vaisefud3
And that's my problem, how to get it. You mentioned pitch and yaw but I never seen to get a location from them.