LordMysterious Posted January 10, 2018 Share Posted January 10, 2018 Hi All I'm quite new to Pixi (as in this is day #2), I have a simple circle divided into segments (Wheel of Fortune style). What I want to do is spin it, wait for a few seconds, slow down and stop on a specific segment, with a bit of bounce-back. By the looks of things rotation itself is fairly straightforward, but how would I go about doing this? Many Thanks ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 10, 2018 Share Posted January 10, 2018 Hi! Do you have any experience with Flash or any engine/renderer based on it? Pixi doesnt have big tutorials except https://github.com/kittykatattack/learningPixi . Also pixi doesnt have any animation functions from the box, you should use something like https://greensock.com/?product-plugin=js-pixiplugin , or you can write down formulas for bounce, code some javascript and put it in animation ticker. Your task is too vague. Try to implement it, stumble across a bug, spend several hours on it, make a fiddle and post here, then people will help you Quote Link to comment Share on other sites More sharing options...
botmaster Posted January 16, 2018 Share Posted January 16, 2018 One way to go about that type of thing is to start from the goal and calculate everything back to the start then playback everything. For example, pick the segment to stop to and register the position you need to be at (for a wheel probably degrees/radians), then calculate how many rotation you will need to run (for example start to segment = - n degrees + n number of turn = n * -360) then reverse all those number to positive (depends on direction of spinning) and start your wheel, your wheel will make n number of turn + n degrees to your segment position + then apply a small ease back and you are done. 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.