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 / is there a maximum velocity?

Author
Message
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 27th Aug 2012 01:02
Is there a maximum velocity in physics controlled sprites? It appears that I cannot get a sprite to follow my mouse, regardless of how much MaxForce I give it, or what StepPhysics settings I use. It always drags along behind like it is moving through treacle.

More info:

I'm using CreateMouseJoint, and SetJointMouseTarget to move the sprite (shouldn't it be SetMouseJointTarget???)

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 27th Aug 2012 01:40
There is a maximum velocity in Box2D of 2 meters per time step (or 120 meters per second at 60fps). You can adjust the simulation size with SetPhysicsScale so that your screen size is an appropriate number of meters. For example the default scale is 0.2, so a resolution of 1024x768 makes the screen 205x154 meters in size, which is quite significant.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Aug 2012 05:01
It would also help to see the code you are using, like are you using Percentage or Virtual space? How are you setting up your physics?

Cheers,
Ancient Lady
AGK Community Tester
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 27th Aug 2012 20:29
Paul do i have to set it for every kind of resolution the app could be played in ?
Iam using the percentage system for my game.

Android 2.3 Gingerbread , ZTE Skate , 480x800 , 800 mhz cpu , Samsung Galaxy Y , 240x320 , 832 mhz cpu
Android 4.0 Sandwich , Dmtech 3g 9738B , 1024x768 , 9.7 inches , cortex A8 1.2 cpu , 1 gb ram.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Aug 2012 21:38
If you use the percentage system it should be consistent, also if you have a hard coded virtual resolution.


this.mess = abs(sin(times#))

Login to post a reply

Server time is: 2024-05-02 03:08:54
Your offset time is: 2024-05-02 03:08:54