Contraining a spawn (sparkle) to a moving image
natclarke
Brisbane, AustraliaMember, PRO Posts: 243
I have a gift image that randomly moves from the top of the scene to the bottom. I would like the spawn sparkle to move with it. Currently it is at the top and stays there. How do i do that.
Nat Clarke
Life Cleansing
Comments
You can create a real attribute say gift_y and on your gift create a rule to constrain gift_y to self.position.y
On your sparkle actor constrain self.position.y to attribute gift_y
This will work as long as its only 1 gift falling at a time on screen. And if its also moving from right to left, simply create the same rules above but for the position x
Another way can be to simply use the particle effect on the gift and setting the sparkle as the image. This may be easier and work with multiple gifts falling at one time.
Fortuna Infortuna Forti Una
This template is free thanks to gsanimator.com
http://gsanimator.com/product/sparkling-star/
I've used it and its awesome and extremely easy!
Like Balls? Then click here! We've 100 coming soon
Thank you!
Nat Clarke
Life Cleansing