Forum rules - please read before posting.

Inventory items / Active graphic vs Cursor graphic

edited August 29 in Technical Q&A

Hello Chris,

I would like to know if there is a way to adjust the "click offset (from center)" and the "Size," but for the "Active Graphic" icon and not for the "Cursor (optional)" icon.

I would like to keep the principle of how "Cursor (optional)" works, but with an "Active Graphic" behavior.

At the moment, if I want the "Active Graphic" behavior, I cannot put an icon in "Cursor." But then I cannot adjust the size or the "Click offset."

Any idea?

Thank you :)

img : https://iili.io/K3yOKD7.jpg

Comments

  • The per-Item size and offset values are linked with the Cursor texture. When the "active graphic" is used, it will refer to the "Inventory cursor size" and "Default click offset" values in the Cursor Manager.

    For complete control over the appearance of selected Inventory items, your Cursor's Rendering can alternatively be set to Unity UI, where display is handled via a RawImage component that can be scaled/repositioned as intended.

  • Hello Chris,

    Thanks for your reply.
    I've looked a little, but I'm afraid I don't understand :'(

    If I set Cursor Rendering -> Unity UI and give the prefab (CursorUI by default), I can no longer set the offset of my default cursors, those for interactions (grab, walk, inspect, etc.).

    I also have a different offset for each icon to position them correctly based on the icon's graphics.

    I'm having trouble understanding how I can make the two methods work together, namely:

    • Icon interactions with their respective offsets
    • Inventory icons with a hover effect when you hover over a hotspot. Besides, for these icons, they are all the same size; the click offset is always in the top left corner.

    I don't know if I'm being clear; maybe I misunderstood your answer :/

    Thanks!

  • When using Unity UI, it's up to the UI to handle positioning. It can be done through animation, or script.

    Is Unity UI mode necessary here? Did you try the default values I mentioned in the Cursor Manager?

    The other option is to resize / expand cursor textures so that their "click points" are all consistent, i.e. in the centre of the graphic.

  • edited August 30

    I've set Inventory Cursor, default click offset, and I tried x: -0.5 / y: 0.5 to set the offset to the top left.

    But the cursor is still in the center.

    Here's a screenshot of my settings : https://ibb.co/ycJ5tjbG

    In the last image, the mouse cursor is in the center (red cross) rather than the top left (yellow cross).

    Maybe I didn't quite understand how to set it :D

  • It's a pixels value - raise the offsets to larger values to see its effect.

    The other cursor rendering option is Hardware, which uses the top-left for Inventory items by default.

  • Oh okay ! It works ! Thank you so much Chris !
    See you ;)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.