Forum rules - please read before posting.

New Cursor Interaction Icon too Small for Usage

edited August 2024 in Technical Q&A

Using Adventure Creator (AC) v1.81.6 in Unity 2022.3.22f1 to create a 3D game

Disclaimer
I've been searching the forums, and read the documentation, but found nothing on this since 2015.

What is the Problem?
On mouse-over of a hotspot, a newly created Interaction Icon appears, but it is a tiny little black square that cannot be interacted with.

If the same hotspot has its Interaction Cursor / Icon changed to any of the three default interaction icons (TalkTo, LookAt, and Use) that come packaged with AC, then those work as expected on mouseover. It is only the newly created icon that appears as too small to use.

The graphic being used as a texture has the same dimensions as, and its properties are configured identically to, the included, default cursor icons. All icon graphics, my own and the included defaults, work fine if assigned to the default interaction icons listed in AC's Cursor menu.

What I Have Tried So Far
* In AC's Cursor menu, I used the Create New Icon button to create a new interaction icon for use on mouseover of a hotspot. I also created a new PNG file for use as an icon texture, and it is the same dimensions (32 x 32) as the icon textures that come with AC. It's properties are also configured identically to the default icon textures (speech bubble, magnifier, and gear).
* In AC's Cursor menu, setting the newly created interaction icon to use one of the existing, pre-packaged textures does NOT work. That is, the mouse-over icon does appear, but it is still just a tiny dot, even using a default graphic.
* In AC's Cursor menu, setting one of the default interaction icons to use my newly created PNG texture does work. For example, changing the texture for the TalkTo icon from the speech bubble to my new graphic works. The new graphic displays as expected when mousing over a hotspot that uses a TalkTo interaction.
* I've also tried a much larger (5x) graphic as a cursor icon. It changes nothing.

Something I Notice, but Cannot Explain
The three default icon graphics (Assets > Adventure Creator > Graphics > Textures) each have two asset files, a cursor and a 2D / UI sprite. I'm not sure why the 2D sprite is there for, but the interaction icons in the Cursor menu all have the cursor assigned. I have not found any linkage between the cursor file and the sprite file. If the cursor is using the sprite somehow, I don't see where that assignment is made. In any case, my new image does not have a corresponding sprite, and it will work when assigned to a default interaction icon, as noted above.

What I Think
Using the AC Game Editor > Cursor menu's Create New Icon button appears to create a new icon that is too small to use, even if it uses a PNG file that is correctly set up as a cursor.

Is there another setting, or a workaround for this?

References I've Seen so Far
* Tutorial Instructions: https://www.adventurecreator.org/tutorials/creating-new-interaction-icons_
* Tutorial Video:

Comments

  • Is the interaction icon being displayed as part of the Interaction menu, rather than an actual cursor? That is, clicking the icon should run the associated interaction - as with the 2D Demo (Choose Hotspot Then Interaction mode).

    If so, then the icon's display is configured within the Menu Manager. By default, the Interaction menu.

    The exact method to resize the icon will be based on the Menu's Source. If set to Adventure Creator, you can adjust the Size property there in the Manager. Otherwise, you can open up the Linked Canvas prefab, and adjust the RectTransform for the icon there.

    If you can share screenshots of your Settings Manager, and the Interaction Menu, I can give more specific advice if needed.

  • As far as I can tell, the menu system is not involved at all. The only way the menu system is involved is if there is some sort of back-end linkage in AC's design that is not immediately apparent.

    The setting for the game (AC Game Editor > Settings > Interaction Method) is set to Choose Hotspot Then Interaction.

    Here is how I set up the interaction:
    Create a New Cursor Icon

    1. AC Game Editor > Cursor > Select Change cursor when over single-use Interaction Hotspots
    2. Select the Create New Icon button.
    3. Below the three default icons present, name the 4th, newly added icon and configure it identically to the three default ones with respect to size, offset, etc.
    4. Assign a PNG graphic to the new icon (PNG graphic must be set as a cursor in its properties).

    Create a New Hotspot
    1. AC Game Editor > Scene > Hot Spot Button > Add New.
    2. On the hotspot's properties > Interactions > Cursor / Icon, select the newly created icon from the pulldown & set player action to Walk to Marker (there must be, and is a marker in the scene for the player to walk to, and it is identified in the hot spot's properties as such).

    The result of following those steps is that, in Play Mode, the newly created icon appears when hovering over the hotspot (it's difficult to see, but it does appear as a 1x1 pixel black spot), but there is no way to click on it.

    However, if I go back to the hotspot's Properties > Interactions > Cursor / Icon, then select one of the three default icons from the pulldown, that default icon does appear as expected, showing a 32 x 32 clickable graphic.

    This raises the question: Is there something wrong with my newly created PNG graphic, even though it is configured exactly as the three default PNG icon graphics?

    Apparently, the answer to that is "no, there is nothing problematic about my newly created PNG graphic," because I can assign it as a texture to any of the three default icons and it appears normally.

    So, I think the problem is isolated down to the Create New Icon process.

    Is there an additional setting somewhere that needs to change?

  • What is your Cursor Manager's Cursor rendering field set to?

    If set to Software, then each Interaction icon defined will have its own Size field that will control how large they appear. Are these all listing the same size?

    If they aren't showing, switch over to Software mode and check. If they then seem to differ, does setting your new icon to match the size of the others, and then switching your rendering mode back, fix the issue?

    As this is a visual problem, any related screenshots you can share will help provide context.

  • edited August 2024

    It is set to Software.

    Below is a link to a folder with 4 Screen-shot images:

    • AC_icon_issue_01 - A visual of what I'm seeing when in play mode.
    • AC_icon_issue_02 - A visual of a 'normal' icon when in play mode (same scene).
    • AC_icon_issue_cursor_mgr - A screen capture of the cursor manager
    • AC_icon_HtSpt_props - A screen capture of the relevant hot spot properties.

    Link > https://drive.google.com/drive/folders/1XEHshVDl9kYdYphMYDQFFjH6efaV5Qzc?usp=drive_link

  • The black border surrounding the icon suggests that this is the from the Interation menu after all.

    For the icon to alter the cursor itself (i.e. the cursor switches to that icon), you can check the Hotspot's Single 'Use' interaction? option.

    Otherwise, when using Choose Hotspot Then Interaction mode, a Hotspot's defined interations will appear within the Interaction menu. This menu will display all available icons in a row.

    What I suspect is happening is that the icon itself isn't actually displaying at all - the Interaction menu is appearing (with a black border), but no icons within it are shown.

    This is because the default Interaction menu stores each available Interacton icon as a separate Interaction element. As you add new icons to the Cursor Manager, you'll need to update your Interaction menu with an equivalent Interaction element that displays that icon.

    If you visit the Menu Manager, and select the Interaction menu, you should find the three Interaction elements for the default Use, Talk to, and Look at icons. Copy/paste one of them, and set the new one's Cursor field to your new icon.

    If the Menu's Source is set to Adventure Creator, that should be enough (you can preview its display in the Game window). Otherwise, if Unity UI is involved, you can update its Linked Canvas prefab with a connection to a new Button object. I can advice further if necessary, but have a look through the Menu and see how things look.

  • Bingo!

    That did it. I did not realize that I needed to add that as a new menu item in the menu manager's Interaction menu. So there is, after all, a "linkage" between the Menu Manager and the Cursor Manager in the AC Game Editor!

    Ok, got it, got it, got it. I see it now!

    Problem solved. Thank you, thank you, thank 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.