Author Topic: AIPlayer::setAimLocation inaccuracy  (Read 801 times)

If I use something like %bot.setAimLocation(%bot.target.getPosition()); - the bot aims below the player (lower). If I vectorAdd like "0 0 3" to the target's position, it doesnt aim lower, but it aims next to the player, then. Isn't there a stable way to get it aim exactly on the player? (this happens with setAimObject, too)

It's not aiming lower than the player, it's aiming at their position, which is at their feet.
You could try aiming at their eye point and see if that makes it feel a bit more accurate.

Or .getHackPosition()

%player.getHackPosition() returns the center of a player's collision/bounding box. Then I suppose you can do some simple vectorAdd's if you want them to shoot at the head or not.
« Last Edit: October 26, 2010, 04:00:11 PM by Loki »

%player.getHackPosition() returns the center of a player's collision/bounding box. Then I suppose you can do some simple vectorAdd's if you want them to shoot at the head or not.
i don't think that would work for small/large players though

i don't think that would work for small/large players though
So you multiply by their Z scale - very simple

No no, it's a special equation if you want to aim it higher from any distance and all. But Truce already told us: getEyePoint.

I tried using .getHackPosition(), but it still aims lower and
aims next to the player

Current:
Code: [Select]
%this.setAimLocation(%this.bb_target.getHackPosition());
You can see how it actually "aims next to the player" on "Flaw's Testing Server".
EDIT: It actually works when I use this:
Code: [Select]
%this.setAimLocation(vectorAdd(%this.bb_target.getMuzzlePoint(0),"0 0 2"));
« Last Edit: October 27, 2010, 08:41:41 AM by Bauklotz »