Loading...
 

PogamutUT2004


Shooting Direction

Hi

Basically I'm trying to make the bot shoot like human player does, but I need the player's shooting direction from the observer class.
Is there any way to get the player's shooting direction or target from observer class? So I can use that info to calculate the angle or location for performing the shoot action.
Hi!

Well, I would stick with Rotation attribute. Basically you never know what is player trying to hit, so the rotation attribute is the only information you can work with. Rotation pitch and yaw should provide the information where the player is aiming.
With the bots the situation could be different, cause we could export target/location they are shooting at (this would require small code change).

best,
Michal
But then again, Rotation only contains yaw information. It doesn't give me any pitch or roll info. Is there something missing in Gamebots for Rotation data?
Well, that means there is a bug in Rotation exporting. The issues are only with player rotation obtained through observer, right? I'll look into it asap.

michal
I tested with bot connection as well, the issue is still there. Rotation info only returns yaw info for both.
Ok, I've fixed it. Download latest GameBots2004 version from SVN. I've fixed Rotation attributes in observers Self message and Player messages for bots, control servers and observers.

Best,
Michal
Thanks, it's working perfect now
 

News

News RSS RSS feed for News link



Pogamut

Quarterly RSS RSS feed for quarterly reports

Acknowledgement

This work is supported by GA UK 1053/2007/A-INF/MFF (2007-8), GA UK 351/2006/A-INF/MFF (2006-8), the Ministry of Education of the Czech Republic (grant MSM0021620838) (2008-9), by the Program "Information Society" under project 1ET100300517 (2006-9), and the project Integration of IT Tools into Education of Humanities (2006-8) and by the project CZ.2.17/3.1.00/31162, which are financed by the European Social Fund, the state budget of the Czech Republic, and by the budget of Municipal House Prague.