Can't Figure Out How to Make Different Zoom Amounts for Different Weapons

RogueSnake

New member
I watched the videos and read some of the documentation but can't figure out how to make different weapons that I've create have different levels of zoom when aiming (i.e. an assault rifle zooms in a little, a sniper rifle zooms in a lot). I see that in the demo scene, the main camera has a list of different states for this: AimSniperRifle, AimAssaultRifle, etc. with different presets with zoom levels. However, if I add a state to the camera in my scene called AimMyAssaultRifle, it doesn't actually activate when I aim the MyAssaultRifleObject, it only activates the Zoom state:

1740259694806.png
So how do I tell the new state I created to activate when I aim with MyAssaultRifle? Thanks.
 
Those states are activated from the Item Set. You can set the state name within the Item Set on the Item Set Rule:

1740382478510.png

A "{0}" value will set the same state name as the ItemType.
 
I changed the state name to MyAssaultRifle, but it still doesn't realize when I'm aiming the "MyAssaultRifle" prefab. Does a "AimMyAssaultRifle" state need to be created somewhere?

1740416414282.png
 
And your inventory - is that actual Item Type equipped? Is Items a category within your own item collection?
 
MyAssaultRifle is equipped so that is good. On the first person view type if you change your state name from "AimMyAssaultRifle" to "MyAssaultRifle" does it get enabled? If it does then you'll need to enable the "Append Item" toggle on the Aim ability:

1740575989717.png
 
Another quick question. Where is the input/key bindings set? If I wanted to change the melee button from B to something else, I don't see where that's done. I found an item called Input System_Actions, but changing the buttons in there doesn't seem to change anything
 
Glad that worked!

If you are using the input manager then it's set in the input manager settings. The input system has a character input action mapping asset that is found in the integration folder.
 
Back
Top