Aim State Problem

atmuc

Member
I use UCC (FPS) and UIS. I set a rifle in inventory/loadout. I can aim, zoom and fire. When I add UI components ( Crosshairs), FPS arms are in idle mode. When I zoom I cannot see arms and rifle. I can fire in that case. I use custom virtual controls and custom viewtype. What can cause aim position?
 
When I disable Crosshairs, everything works fine.

When I comment that line in CrosshairsMonitor/OnAttachCharacter, It works too.
//m_CameraController.SetCrosshairs(transform);

Problem is not just zoom. I attached screenshot with and without Crosshair ui monitor.

1611925990128.png
 
If you've created your own view type then I'm not able to really help much. If you can repro it within the demo scene I'll definitely take a look but with the built in view types the crosshairs does not affect the aiming.
 
It is not related viewtype. I tested with First Person Combat view type, I have the same problem. What changes the first person arm's posture/animation? I use demo animators. FirstPersonArmsDemo animator has just Assault Rifle/Idle. It has not a state for Aim. Although aim is active, character is not aiming.

1611929136606.png1611929184658.png
 
In first person mode the animations are aiming state when in the idle state. It looks like you are using the default assets - can you create a fresh project and explain step by step how to reproduce what you are seeing?
 
I found the problem by tracing UCC code. Look calculations use crosshairs position. When I use Screen Space - Camera on Canvas of Crosshairs component, UCC calculates look rotation wrong.

1611931101925.png
 
Hmm, glad you were able to make progress on figuring out what it is. My guess is that the crosshairs calculation needs to be changed for that render mode. This is causing the look direction to be incorrect.

I wrote it down to look into for the next update.
 
Top