#Blender Button Advice

1 messages Β· Page 1 of 1 (latest)

pseudo iron
#

Mornin' all πŸ‘‹ πŸ™‚

I wonder if some kind soul could help me with some advice regarding the following?

I've been running a small test in Blender to try and get a button click to play another object's animation. It feels like it should be relatively simple to do but having tried a variety of different options I can't seem to get anything to work.

I have a primitive sphere (the button) and a cube (which has an animation assigned to it). The cube has a Needle Animator component which consists of a 'Default' (ie non-playing) animator state and a 'CubePlay' animator state (ie the animation strip).

I'm assuming (possibly wrongly πŸ˜… ) that I need to use 'setBool' in the button options... but I don't know what to add after that to get the 'CubePlay' animator state to play (see screenshot 01). As said, I've tried adding variety of things but nothing's worked thus far.

On the other hand, maybe I'm on entirely the wrong track and ought to be using a different method altogether? (see screen shot 02).

As ever, any thoughts and suggestions will be very gratefully received πŸ₯°

trail graniteBOT
# pseudo iron Mornin' all πŸ‘‹ πŸ™‚ I wonder if some kind soul could help me with some advice re...

Thanks for reaching out @pseudo iron

Please read through the following and share the information requested. This will help us to better assist you.

Description

Describe the issue that you're seeing. Please be as detailed as possible e.g. is this issue happening in Unity or Blender, which Needle Engine version are you using, do you see any errors in the Editor or Browser console, etc.

Information:

  • If you're using Unity click the menu item Needle Engine/Report a Bug/Copy Project Info to Clipboard. Please share the results below.
  • Please provide code snippets using Discord Code Blocks
  • Have you contacted Needle through another channel or just through Discord?

Useful Links

Did you know πŸ’‘

We now also have a forum with AI support: Join now with your discord account - or request help by clicking the button below.

exotic oriole
#

Hi @pseudo iron you would need to setup a transition in your animatorcontroller with a bool parameter condition. I'm currently looking into that since it seems like Blender 4 changed a few things regarding the animator controller.

I think this can also be easier and I'll look into that as well (where you should just be able to setup Button.play("animation_name") and be done)

pseudo iron
#

Ooooooo! That sounds great!

Cheeeeeeeeeeeers for the info, Marcel... and thanks too, in advance, for having a look into things 😎 🀩 πŸ‘

exotic oriole
#

Hi @pseudo iron can you try with this version? #πŸ“š-releases message

#

You can now just assign the play function from a button and enter your animatorstate name