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 / Force vs rotation question

Author
Message
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 9th Sep 2011 00:11
I'm making a break-out type game, the ball is hitting the bricks, the physics looks good. But... when I let the ball rotate, it loses a lot of its speed, eventually slowing down to nothing, just rotating in place.

Is there something I can do to keep the moving, but still allow it to rotate? I tried damping the rotation, but the ball still slows down. I tried a restitution of > 1, but that leads to crazy ball speeds.

Any thoughts?

Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 9th Sep 2011 01:01
Have you tried just using SetSpriteAngle to rotate the sprite rather than using the physics commands? You could base the rotation rate based on the velocity of the ball so the faster it moves the faster it rotates, which would probably look good enough.
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 9th Sep 2011 01:09
Well, I want to keep my hands off the actual force/rotation values, I'm letting the physics handle all that.

I suspect that the ball will just slow down if its hitting something while the ball is rotating. So, I'll probably just turn off the ball rotation. It occasionally slows down from hitting the bricks while its NOT rotating, depending on the angle, etc. I'm going to give the ball a bit of a restitution bump and see how the gameplay goes.

Thanks for the response!

Login to post a reply

Server time is: 2024-02-21 22:02:27
Your offset time is: 2024-02-21 22:02:27