Statics Posted August 12, 2015 Share Posted August 12, 2015 Hi, I'm trying to build a simple pool game, but I've run in to a few things I don't know how to do. Here is what I have so far. http://playground.babylonjs.com/#T2I6X#2 I'm trying to figure out a way to move the pool stick before the ball gets pushed. I tried some impulse functions as well as animation, but it never quite works. The other thing I am having trouble figuring out is a way to tell if the cue ball is moving or not, so that I can make the pool stick disappear while it is in motion. If anyone can point me in the right direction, it would be a huge help! Wingnut 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 12, 2015 Share Posted August 12, 2015 Hey this is cool perhaps you should move your stick with no physics on it and only apply impulse on the ball you want to move For the cue ball movement detection, just use scene.beforeRender and scene.afterRender to compare ball position Statics and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
Statics Posted August 13, 2015 Author Share Posted August 13, 2015 Thanks for the help, here is a more updated version!! http://playground.babylonjs.com/#T2I6X#3 My next plans are to have an adjustable power level, and to make the balls disappear after touching a hole. Any comments or suggestions would be great! iiceman 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 13, 2015 Share Posted August 13, 2015 LIKE IT A LOT Quote Link to comment Share on other sites More sharing options...
Statics Posted August 13, 2015 Author Share Posted August 13, 2015 I'll post a somewhat finished version later 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.