Activating state on camera whilst sprinting?

dandesign

New member
Hi!

I'm currently working on a project, and we would need the camera to increase its field of view whilst sprinting. I've looked around, and I haven't found anything. Is there something I'm not seeing, or would we need to do something ourselves?

Here is the preset on the camera that should trigger when the player sprints:

ps1.PNG


I suppose there's something we could do here (?):

ps2.PNG

Or here:

ps3.PNG


But we're completely lost at this point. Any advice?
 
Okay, a weird update. It seems like connecting a controller makes the behavior work perfectly. This works until the Unity Editor is restarted. If I turn off the controller and restart Unity, it no longer works again. I'm using the Rewired integration - could that have anything to do with it?

Edit: Wow. Okay. Feel pretty dumb right now, but the 'ConnectedController' state activates when a controller is activated. The behaviour works because that's where I set the camera state to change. That works great for the controller, but is there any way to do the same for KB/M, or just change the default state of the Sprint ability?
 
Last edited:
When the Speed Change ability activates you can have a View Type state which also activates. Take a look at this video for an overview of the state system:

 
Top