Problems with scope on Sniper Rifle and Assault Rifle

I have the scopes set up on both the sniper rifle and assault rifle, but seem to be having some slight issues.

1. On the assault rifle when the right mouse is clicked the view changes to down the scope, however to view thought the scope isn't working as it should


2. On the sniper rifle when the right mouse is clicked the view changes but the sniper scope crosshairs don't show


I have attached a video clip and some images showing both scope views


 

Attachments

  • assault rifle scop and camera.png
    assault rifle scop and camera.png
    438.3 KB · Views: 31
  • sniper scope and camera.png
    sniper scope and camera.png
    425.9 KB · Views: 27
I got the Assault Rifle fixes, turned out I hadn't set the scopes camera position - copied this from Nolan and it worked.

Still trying to get the aim overlay for the sniper Rifle to work - proving a bit tricky
 

bluebird

Member
Hi,

I followed those 6 steps for scope and also copied transform of camera & camera component itself from demo scene, but no luck!

depth value of main camera is 1 & for scope camera it's 0.
I attached a screenshots for reference.
 

Attachments

  • 1 scope.png
    1 scope.png
    224.3 KB · Views: 36
  • 2 scope.png
    2 scope.png
    76.5 KB · Views: 37

bluebird

Member
Hi,

I followed those 6 steps for scope and also copied transform of camera & camera component itself from demo scene, but no luck!

depth value of main camera is 1 & for scope camera it's 0.
I attached a screenshots for reference.

@Justin Can you look at above set up?
Did I miss something to set up?

I noticed that in demo scene sniper canvas is individual object in hierarchy. but when we set up monitors and virtual controls from manager, SniperRifleUI is child of parent game object Monitors.
This is the only difference I noticed.
 
Last edited:

Justin

Administrator
Staff member
From a UI perspective the only difference between the sniper and the assault rifle is that the sniper specifies which full screen UI to show. This UI has an ID and that ID is specified on the FullScreenItemUIMonitor, which is on the SniperRifleUI GameObject in the demo scene.
 

bluebird

Member
@Justin, I searched this inside document but unluckily didn't find !!
btw, I did as you said still full screen ui canvas isn't visible.

1353

1354
 
Last edited:

Justin

Administrator
Staff member
When you aim do you have a state which sets Show Full Screen UI to true? The AimSniperRifleItemPreset preset within the demo scene is an example of this. This will then enable the GameObject that the FullScreenItemUIMonitor component is on.
 

bluebird

Member
When you aim do you have a state which sets Show Full Screen UI to true? The AimSniperRifleItemPreset preset within the demo scene is an example of this. This will then enable the GameObject that the FullScreenItemUIMonitor component is on.
Nope. I don't have such state. I have only default state on sniper rifle inside item component.
Can I use AimSniperRifleItemPreset into my scene?
 

bluebird

Member
Hi @Justin

If we set Append Item to true on Camera Controller component - it means that item type will be appended to zoom state.
In your demo scene, item type name is 'SniperRifle' and zoom state name is 'Zoom' so it will be 'ZoomSniperRifle'.

And I seen that you don't have state named 'ZoomSniperRifle' under states and when we aim, it activates 'AimSniperRifle'.
Can you please clarify here..

This is screenshot taken when I aim with sniper rifle:

aim sniper rifle.png
 
Top