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 / Velocity Always the Same?

Author
Message
The Daddy
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location: Essex
Posted: 29th May 2012 20:14 Edited at: 29th May 2012 20:26
[SOLVED].....Hooray
Hi all

I am playing with AppGameKit and a brick breaker game as a tutorial! Thanks to Ancient Lady, got the ball moving and bouncing ok.

However, no matter what velocity i set my ball to it is always 35,35 or -35,-35?

I set the velocity outside of the main loop as the ball has no friction, minimal mass? Damping is zero??

The ball stays at a constant speed, which is good, but if I set the velocity higher:


No change in ball speed? What am I doing wrong.???
Tier 1 (still cannot get Tier 2 to compile-anyone fancy converting the .libs to .a for mingw???)

Constantly seeking!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th May 2012 14:44
There's a good chance this is caused by the physics scale. There is a maximum velocity based on the scale of the physics simulation. I reached it at about 600 at the hackathon and had to use "setPhysicsScale" at around 0.2 I think to get the kind of speeds that I wanted.

Make sure you call it before creating any physics sprites or any other physics calls or anything already created will be scaled too.

Login to post a reply

Server time is: 2024-11-23 14:13:56
Your offset time is: 2024-11-23 14:13:56