How do you set the Assault Rifle up to look through the scope

Noob here

How do you set the assault rifle up to look through the scope when the right mouse button is clicked in First Person view. I am using the FirstPersonDemo animation controller. When I right click it changes the FOV but not to the scope

Any help or a nudge in the right directions would be appropriated

Thanks
 

Attachments

  • normal.png
    normal.png
    151.4 KB · Views: 7
  • zoom.png
    zoom.png
    172.8 KB · Views: 7
You can use the state system to set the position offset of the First Person Perspective Item when the aim ability is active. This video gives an overview of the state system:

 
Yeah, I watched the video in this thread from Justin to see how to add states.

On my character I added the aim state to the First person Perspective Script and the Shootable Weapon Script. - Check out Nolan in the demo scene for reference

That worked for getting the perspective to change then I had to add the scope camera. There is an easy to follow guide on the Opsive website about adding the camera.
 
thank you for responding. I think i did the aim state wrong.. it zooms in on the crosshairs not the scope
 
Last edited:
So You add AimAssaultRifleShootableWeaponPreset Under Nolan/Items/AssaultRifle as a new state.
Then Follow the scope camera guide?
 
So You add AimAssaultRifleShootableWeaponPreset Under Nolan/Items/AssaultRifle as a new state.
Then Follow the scope camera guide?


AssaultRifle/First Person Perspective Item (Script))/States/Add existing state

AimAssaultRifleFirstPersonPerspectiveItemPreset


I have added a picture
 

Attachments

  • Picture1.png
    Picture1.png
    770.4 KB · Views: 27
That image looks correct. The state will only activate when the Aim ability is active. It'll then adjust the weapons spring to be more gentle. You'll also need to ensure the aim assault rifle state is applied to your view type.
 
I have an issue with the scope disappearing and only showing up with firing the weapon. Here's a video of it.

 
Looks like your recoil is pushing the scope too close to the main camera so it is being clipped.
 
I created a new Lens to apply the FirstPersonScope texture to and that has fixed the issue where it's disappearing but I have noticed that the aim is off now. While aiming the bullet is hitting high. Anyway to adjust that?

I have also noticed that if you have a single room with 1 point light the scope will be black unless you move away from the light. Anyway to fix this? Like make the scope not use lighting or something.
 
Last edited:
Top