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 / Maximum velocity question

Author
Message
victordavion
12
Years of Service
User Offline
Joined: 3rd Jan 2012
Location:
Posted: 3rd Jan 2012 09:14
Summary: An object falls. When the screen is pressed on the right side an impulse is added in the positive X direction and upward (to counteract gravity). When the screen is pressed on the left side, vice versa. The object wraps around the screen (exits right, enters left : exits bottom, enters top)



Question: I've noticed that without the cap on horizontal velocity, there is still an actual cap (which I'm detecting to be around 600). Added to this curiosity is that when I let the object free fall, the horizontal velocity will drop after about 500 vertical velocity as if it were being dampened (dampening is set to 0).

Why is this?
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd Jan 2012 17:54
I haven't experienced this myself. Can you produce a simple demo that shows this?

victordavion
12
Years of Service
User Offline
Joined: 3rd Jan 2012
Location:
Posted: 5th Jan 2012 09:37
Just use a dummy (64x64 is what I'm using) sprite for Saucer.png. Running this on the phone max velocity caps out around 410. It's having something to do with the maximums within the physics engine itself, but the annoying thing is how the vector is "stealing" from the other direction (vertical taking velocity from horizontal).

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Jan 2012 13:45
Yes, there does appear to be some kind of limit. It's about 600 on my machine.

I don't see it "stealing" anything from the horizontal movement, that just seems like natural reduction that would occur in real life. As the gravity is pulling your object downward it's horizontal movement would reduce down to zero.

If you want more control over the movement you could try setting gravity to zero in both directions?

Login to post a reply

Server time is: 2024-03-28 18:02:23
Your offset time is: 2024-03-28 18:02:23