Share Posted May 29, 2022 Hello, I've been working on some simple sprite animations with pixi and greensock. The idea is a glowing ghostly blob that leaves a trail of footprints behind it. I'm pretty close to the effect I want but the footstep particles are always straight up in down not respecting the autorotate. Any advice or guidance would be warmly received. Sincerely, Mark See the Pen MWQQXrN by motionproto (@motionproto) on CodePen Link to comment Share on other sites More sharing options...
Author Share Posted May 29, 2022 oh wow... i added an arrow to the sprite to confirm that it was auto-rotating... its going crazy! Link to comment Share on other sites More sharing options...
Author Share Posted May 29, 2022 ghostNull.rotation = ghostNull.rotation * (Math.PI/180) I added this to the pixi update loop and that fixed it. (once i set autorotate: 90) Looks like MotionPath is degrees only? tried wrapping in pixi:{} but failed... now just need to get particle emitter to inherit rotation.... See the Pen abqqjLE by motionproto (@motionproto) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted May 29, 2022 Hey there, thanks for being part of Club GreenSock! There's a lot of code here for my sunday evening brain and I'm not super versed on PIXI. For now - GSAP-wise you can set useRadians to true See the Pen KKQQrZM?editors=1010 by GreenSock (@GreenSock) on CodePen I'll take a little look at the pixi emitter bit tomorrow and see if I can offer any advice there! 1 Link to comment Share on other sites More sharing options...
Author Share Posted May 29, 2022 Turns out a particle must have at least some velocity (ie: .001) at birth or the Emitter.rotation will not be applied. problem solved. Use radians! didn't know that was possible. Thank you! 1 Link to comment Share on other sites More sharing options...
Share Posted May 29, 2022 Hooray! Teamwork - high five! 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now