Problem with Aiming while using a visual asset.

RobbieNI

Member
Hi there,

Bit of a random one here. I am currently using this visual asset - https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/stylizer-extended-92269, it is basically a post-processing tool that also allows you to pixelate the camera.

However when using this asset, and while the UCC main UI is active it messes with the character's aim. It only happens while the canvas is active, as shown in the two images posted (Note that I'm firing in the same direction in both of these). Any ideas why this might be happening, something to do with the look-source maybe? Any help would be greatly appreciated.

Thanks,
Robbie.
 

Attachments

  • NoUI.PNG
    NoUI.PNG
    85 KB · Views: 6
  • UI.PNG
    UI.PNG
    125.4 KB · Views: 6
I'm not familiar with that asset but that's very weird. Something that's only doing post-processing shouldn't be interfering with anything to do with mouse input at all.

I wonder if the pixelization effect is actually just lowering the camera's viewport, then upscaling it at the original resolution. If it were doing something like that, then that might cause the player's apparent mouse position to be different than the recorded input mouse position. I would ask the asset creator about that. If that's the case, then you may need to change how the mouse input is passed to your character's UnityInput component (or whatever Input component you're using), e.g. if the viewport is being upscaled by 2x then you might be able to just return 1/2 of GetAxisRaw in a subclass of StandaloneInput.
 
Hey Andrew, thanks for getting back to me.

I think that might be the case, setting the pixel scale to 1 seems to fix the issue (I was using .3 in the screenshots there) so I assume it must be scaling the viewport by that value.

I've temporarily fixed it by just enabling the pixelation and setting the pixel scale to .3 at runtime, but don't know if this will be a long-term solution.
 
Top