• Editor
  • Flying coins – define target position via code

  • تم التحرير
Related Discussions
...

Hello everyone,

I'm working on a "flying coins" animation. The animation should show some gold coins flying from the middle of the screen to a specific target at the top of the screen.

My first solution was to work with path constraints for every single coin. That works perfectly as you can see in the attached video.

But now my coder wants the possibility to dynamicly define the target of the coins, e.g. sometimes they have to "land" a little bit more right, a little bit more left or little more downwards.

I'm new to spine and it would be great to have a solution for this.

The main facts:

  • coins should be flying from the center of the screen
  • the target of all coins should be defined by code
  • my coder work with PixiJS

I'm happy about EVERY hint or tip you have.

Thanks a lot and best regards
Oliver

Bind top tip of all paths to one bone and then move that bone through the code. But I would go with just particle effects not spine. You can also bind middle section of the paths to other bone and also move that bone to achieve best curve.

Thanks for your reply and your tip! That sounds very logic and good to me 🙂 I tried to bind all the top tips to a bone … but … without success … Can you give me a short advise (if it's possible) …

Thanks in advance!
Olli

the path behaves as mesh,

  • create bone at the tip
  • select the path hit bind in weights view and select the bone you have created also select one root bone that bone will remain static
  • repeat for all paths
  • adjust the weights so only the tip of the paths follow the fresh created bone bone.while the bottom tip of the paths follow the static bone.

Great, thank you! I will check it just after "lunch" 😃 That's sounds exactly for what I'm looking for. 

Cheers, thanks and a great weekend!


warmanw wrote

the path behaves as mesh,

  • create bone at the tip
  • select the path hit bind in weights view and select the bone you have created also select one root bone that bone will remain static
  • repeat for all paths
  • adjust the weights so only the tip of the paths follow the fresh created bone bone.while the bottom tip of the paths follow the static bone.

That works absolutely perfect!

Thanks – you saved my weekend 😉

cheers