Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / keeping velocity in 0,0 gravity

Author
Message
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 6th Aug 2016 12:14 Edited at: 6th Aug 2016 12:30
I am trying to use the 2D physics for an Arkanoid type game, I set the gravity to 0,0, the players bat to have kinematic physics so that any ball impact is ineffective, the ball itself is simply dynamic with rotation on and damping down to 0.1.. all the sprites restitution are set to 1.0 for bouncyness! But as you see from the video below, the ball loses quite a lot of velocity when it hits another physics sprite, how can I overcome this and make sure the ball does not get stuck with a bad angle also, I dont want the ball just moving left/right with zero velocityy!





I used an apple just to see the rotation better, and a brick wall at the bottom so i don't keep losing whilst testing stuff
Sorry for the bad lighting also
Hail to the king, baby!
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 6th Aug 2016 18:37
Never mind, I had grouped my sprites anyhow,so upon hitting certain group numbers.. 0 being the red boundary sprites and brick I planted at the bottom, I can then tell it to give the ball a small impulse after finding out which direction it is going in, which again was easily seen by checking the spritephysicsvelocityy to see if it is negative or positive, setting the speed of the vy params of impulse respectively
Hail to the king, baby!

Login to post a reply

Server time is: 2024-09-29 17:29:51
Your offset time is: 2024-09-29 17:29:51