Hi. I'm trying to protoype the camera movement for my 3D game, the idea is for the player to move with WASD keys (I'm using direct movement) but to be able to rotate the camera with the mouse. So, I made a GameCameraThirdPerson as the default camera, but I'm not sure as the right way to make the camera move with the mouse. I noticed that the movement is set to the Horizontal and Vertical input as default, which makes the camera spin and pinch using the same inputs as the player (wasd), so I changed that to CursorHorizontal and CursorVertical (from the UI controls), this does seem to work perfectly, but I'm not sure it's the right way to do it as they're UI controls and not Player controls. Just wanted to check that I'm doing it right.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
No issue from what I'm reading.
This is "UI controls / Player controls" as in from the Controls input actions asset? There's no difference between them, that's just the template's default categorisation of inputs.
Thank you! Yes that makes sense, I was just confused.
Also a follow up question about the Controls input actions asset, I was trying to add a new input to toggle the inventory menu. Here are images of what I did. Basically I added the input to the controls asset and binded the "i" key, then in the active inputs I added a new one for this and then created an actionlist to open and close the menu. When I try to open the inventory in game nothing happens and the console has a warning "Input Action 'ToggleInventory' not found". I'm not sure if I missed a step, I was trying to do this without code because I'm not familiar with that.
Are you editing the correct Controls asset?
When installing the Input System integration template, AC will copy the Controls asset into a subfolder of your game, so that you can make changes without affecting the original asset.
Yes you're absolutely right! I was editing the wrong one, thank you, now it works perfectly