Forum rules - please read before posting.

[UI]Animate Cursors

edited December 2023 in Technical Q&A

Hi all,

As the title suggests, I'm trying to animate cursors when hovering over a hotspot or when clicking. I've got the Cursor Sprites to (Cursor Texture Type), and I've got "Animate?" checked in the Cursor manager. What I can't figure out is how the animation is actually played. Do I need to create a controller and attach it somewhere, or do I just add the sheet to the "Texture" and it takes that automatically?

My interface set-up is as follows:

https://drive.google.com/file/d/1umr-ioZ1shCpo9gSBvnbSEvzKsbDUm3S/view?usp=sharing

As always, thank you in advance for any and all help!

Comments

  • edited December 2023

    You don't need to create a seperate controller, it takes it automatically. Your interface is fine.
    Go to your Cursor settings in the AC Editor.

    If you only want it to animate when over a hotspot scroll down to the interaction icons section.
    There you can see all the additional options for the animations, how many frames it has, rows and columns etc.
    If you open the additional settings under there, you can set how long each frame is.

    It seems to make a grid of the texture you put in there and animate it from left to right.

    Chapter "5.19. Custom cursors" in the Manual

  • Could you share a screenshot of your Cursor Manager that shows the assigned texture and properties?

    If set up for the Hotspot cursor, the animation should kick in automatically - provided the texture itself has Read/Write enabled - though you should get a warning in the Console if this is not the case.

    The other way to animate the cursor is to use the "Unity UI" rendering option - which does rely on an Animator Controller, controlled by Animator parameters assigned in the Unity UI Cursor component.

    The Manual's "Unity UI Cursor rendering" chapter has more details on this feature.

  • https://drive.google.com/file/d/1wfQqiNqPADR1djkY3hjtQUw2eIRMjiHK/view?usp=sharing <- here's a sscreenshot of the cursor. I'll have a look at the "unity UI cursor rendering" chapter and at the " custom cursor" one also. thank you

  • that did the trick, thank you to both!

  • edited December 2023

    follow up question. Can you set a custom cursor on a hotspot or trigger? keeping in mind that the hotspot cursor is already set. I'd like to set an alternative. for example, when hovering over a specific hotspot - have a variant appear. if there's any thread already dedicated to this, just please redirect me there. thank you

  • You're using Context Sensitive interaction mode, which means you can check Change cursor based on interaction? to have the cursor change to each Hotspot icon's first-available "Use" interaction when hovered over.

    Alternatively, if you use Unity UI for the cursor's rendering - and its appearance is set by an Animator controller - then you can introduce additional Animator parameters that affect what animation is played.

    To have e.g. an Object: Animate Action to affect this only run when over certain Hotspots (e.g by certain tag), use the Events Editor to hook into the Hotspot: Select event, and use the "Hotspot" ActionList parameter it creates in an Object: Check tag Action to check what value the Animator parameter should be changed to.

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.