Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Determine the right AimOffset Yaw and Pitch so that the weapon's muzzle forward vector focus a target precisely


i have a question for animators and math experts.

Here is a picture of a Test Blendspace2D:

alt text

What i wanna achieve is:

I have a target and i wanna aim this target. So i have to put in the right Yaw(X) and Pitch(Y) Input. But in the end the muzzle or the whole weapon's forward vector shall precisely aiming the target, on point.

So i have to include a lot of variables like the weapon's x offset, the heights of the individual aiming anims and so on.

I just wanna ask if anybody has deep experiences and already solved this. Any tips and tricks and smart ideas are also welcome.

Thanks in advance


Product Version: UE 4.15
pic.png (546.2 kB)
more ▼

asked Mar 06 '17 at 02:11 PM in Blueprint Scripting

avatar image

677 62 54 118

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I'm not an expert, but this may help.

Normally, the Aimoffset is not intended for precise aiming. It helps you to create a visually acceptable aiming, but in the end many people just trace a line between the target and the weapon muzzle (it's just a socket positioned just at the tip of your gun) and use this trace independently of how well your character, and weapon, is setted up towards the target.

This is why sometimes you see in games characters aiming slightly wrong but you hit the target anyway.

If you really want this kind of accuracy, this can be painful depending on the context. I had to do this for a game and it took me almost a month to make it perfect. It all depends on the type of character you have, the type of weapon, the camera positioning etc. In your case, as I can see by the picture, it would suffice to use the aimoffset to behave the character and you could use inverse kinematics to stay your hands on your weapon while you rotate its muzzle precisely towards the target.

Although it may seem easy talking this way, normally it is not, as it involves a lot of tests and re-checks and each case is different.

more ▼

answered Mar 15 '17 at 07:43 PM

avatar image

21 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question