Page 1 of 1

Can a Pawn fire up or down

Posted: Tue Dec 12, 2017 12:31 pm
by Veleran
I tried various angles for the projectile firing direction but it looked like the pawn can fire only to the front,where it faces.
If you can fire up and down,and know how,give me the projectile angles so i use rty them.

Re: Can a Pawn fire up or down

Posted: Wed Dec 13, 2017 7:06 pm
by Allanon
It's relative to the bone, here is the docs for the fireprojectile() pawn script function:

void PawnHigh::FireProjectile(
string projectile,
string boneName,
float offsetX,
float offsetY,
float offsetZ,
string attribute,
string sound
)


Shoot a projectile in the direction the pawn is facing.

Parameters:
projectile - String holding the name of the projectile type to fire.
boneName - String holding the name of a bone in the pawn (or the pawn's weapon actor if present) acting as launch location.
offsetX - Specifies the offset in x-direction (left) from the bone's orientation.
offsetY - Specifies the offset in y-direction (up) from the bone's orientation.
offsetZ - Specifies the offset in z-direction (in) from the bone's orientation.
attribute - String holding the name of the attribute to damage.
sound - String holding the name of the sound file to play while firing.

Returns:
Nothing.

Re: Can a Pawn fire up or down

Posted: Fri Dec 15, 2017 6:11 pm
by Grok
Veleran wrote:I tried various angles for the projectile firing direction but it looked like the pawn can fire only to the front,where it faces.
If you can fire up and down,and know how,give me the projectile angles so i use rty them.
One way to get a pawn to fire up or down would be to make it face at angle up or down and the fire.

If the pawn is to fire at the player you could start with RotateToPlayer() before FireProtectile()

If the player is higher than the pawn, the pawn should be fireing up (I think).

There are of course other rotate commands you could use if there is something else you want the pawn to fire at.

Re: Can a Pawn fire up or down

Posted: Sun Jan 07, 2018 9:49 pm
by Veleran
I mean the pawn to shoot up or down independently of the player location.
I will have to experiment rotating the pawn with general rotate commands,since the rotation through the pawn origin in the level editor did not make any difference.