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 / Car on a hilly road

Author
Message
Rasped
10
Years of Service
User Offline
Joined: 14th Aug 2013
Location:
Posted: 14th Aug 2013 22:56 Edited at: 14th Aug 2013 23:54
oops, title is wrong... I have 2 games... same code, different graphics, my bad.

Hi.

I just started AppGameKit yesterday.

I've got some nice parallax scrolling going, a surfboard on wavy water... well, it should be wavy, but the polygon around the sprite is not exactly following the waves.

It jumps from the first wavetop on my sprite to the last wavetop, so my surfboard is in the air above all the tops that are below this line.

What am I doing wrong?

This is the code where I set the physics for the wave sprite(2 lines).

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th Aug 2013 07:11
Turn on physics debugging (SetPhysicsDebuggingOn) to see the shapes used by the physics engine. This might give you a clue about the problem.

If any of your shapes are concave, then the physics engine cannot create the right polygon shape.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Rasped
10
Years of Service
User Offline
Joined: 14th Aug 2013
Location:
Posted: 15th Aug 2013 09:58
They are concave in places.... that explains it.

Thanks... now I just need to figure out a workaround...

Do you have any ideas?
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th Aug 2013 12:06 Edited at: 15th Aug 2013 12:06
You could use my tool to define the shape of your object: Shape Up

"Here I am trying to do some good for the world..." - Fluffy Rabbit

Login to post a reply

Server time is: 2024-04-27 10:18:27
Your offset time is: 2024-04-27 10:18:27