thekayaker33 Posted September 4, 2020 Share Posted September 4, 2020 Hi, If i apply a bulgepinch filter to a sprite and then rotate the sprite. it seems the filter is still stuck in the old spot. Is there a way to align a filter with a rotated sprite? Quote Link to comment Share on other sites More sharing options...
jonforum Posted October 4, 2020 Share Posted October 4, 2020 (edited) Filters are rendered on screen so you need use sprite.toGlobal() on your sprite and normalise values because filters use webgl values, and it normalized on screen coord and then add a tiker or listener to your filter to fellow your sprite coord.https://pixijs.io/pixi-filters/docs/PIXI.filters.BulgePinchFilter.html ex: bulgepinch.center = [1,1] mean the filter is at 100% right and 100% bottom of screen. so you will need to spritepos/screensize to get normalized position of your sprite from screen. Edited October 4, 2020 by jonforum Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.