x

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"

How to setup aim ironsight

Hey guys im testing some things and i got almost everything to work but a single thing is giving me a big headache, because i can't be able to position a weapon at the center of the camera view so i can shoot with the ironsight aim. So i'm asking help to center a weapon in the camera view to be able to aim with the ironsight. Help me plz :c

Product Version: UE 4.11
Tags:
more ▼

asked May 29 '16 at 12:00 PM in Blueprint Scripting

avatar image

Atan Eko
1 1 2 2

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

3 answers: sort voted first
more ▼

answered May 29 '16 at 12:33 PM

avatar image

weberl
237 17 20 33

avatar image Atan Eko May 29 '16 at 01:44 PM

Yeah i already tried that and it's working watching from third person, but in first person the ironsight does not collide to where im aiming.alt text

this is what i achieved but i need that when i press for example the RMB the ironsight of the weapon have to collide to the center of the screen like this http://vignette3.wikia.nocookie.net/battlefield/images/1/19/M16A3_Iron_Sights_-_Beta.gif/revision/latest?cb=20110929074625 . How can i achieve this?

ironsight.png (1.3 MB)
avatar image ScottSpadea May 29 '16 at 05:39 PM

have you tried changing the relative location of your arm's skeletal mesh? or fixing the animation in your modelling app? or lowering the camera while aiming?

avatar image Atan Eko May 29 '16 at 08:05 PM

i've just tried on lowering the camera and these are the resultsalt text

I can't understand why it happens to be this way. Anyway i just added a socket on the rifle sight so i could move the camera on that socket when i would press RMB and i followed this BP http://blueprintue.com/blueprint/GzY8znsN/ but why it's not at the center?What's wrong? alt text and this is my BP.

amds.png (936.5 kB)
mybp.png (250.3 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I'm assuming you are using true First Person for this (the player model you see in first person is the same one everyone else does).

My solution is to have a camera on a spring arm which is part of each weapon blueprint. You line it up with the ironsights and it provides a decent sway. After that you have a script which make the camera blend between your first person camera and the weapons ironsights camera when you try to aim. This allows for manual alignment for each weapon.

The harder part ends up being preventing too much camera sway. I did this by having the upper torso use a different, more stable blend space than the feet so the weapon wouldn't contort as much while moving and aiming.

As the weapon still has a bit too much sway from the feet moving after that to stabilize the weapon while aiming down sights (the scale of a problem this is varies by your animations) you need to have a Transform (modify) bone set to wherever your weapon attach point is. You then have the transform set the weapons rotation to be stable from the body while aiming by using a boolean switch which sets the alpha of the transform between 0 and .9 whenever the player aims down sites.

more ▼

answered Jul 10 '18 at 04:19 AM

avatar image

metrick00
1

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

I'm assuming you are using true First Person for this (the player model you see in first person is the same one everyone else does).

My solution is to have a camera on a spring arm which is part of each weapon blueprint. You line it up with the ironsights and it provides a decent sway. After that you have a script which make the camera blend between your first person camera and the weapons ironsights camera when you try to aim. This allows for manual alignment for each weapon.

The harder part ends up being preventing too much camera sway. I did this by having the upper torso use a different, more stable blend space than the feet so the weapon wouldn't contort as much while moving and aiming.

As the weapon still has a bit too much sway from the feet moving after that to stabilize the weapon while aiming down sights (the scale of a problem this is varies by your animations) you need to have a Transform (modify) bone set to wherever your weapon attach point is. You then have the transform set the weapons rotation to be stable from the body while aiming by using a boolean switch which sets the alpha of the transform between 0 and .9 whenever the player aims down sites.

more ▼

answered Jul 10 '18 at 01:13 PM

avatar image

metrick00
1

(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