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.

Author
Message
njozzy
16
Years of Service
User Offline
Joined: 6th May 2010
Location:
Posted: 7th May 2010 15:44
Hey I have been having trouble with my collision with platforms. I want there to be raised platforms that the ball you control can jump on.

The problem is that when I jump onto a box the ball gets stuck onto the object and slowly sinks into it. What I think is going on is that the ball can only function when it meets the ground height, or it’s a collision problem, anyway I’ve gotten lost I would really would appreciate some help =] thanks

Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 7th May 2010 17:04

This part of your code is somewhat messy. I see that you are changing y# whenever your ball is higher than the ground. That's not normally a problem except you are trying to get on top of platforms that are not the ground. Because you are using automatic collisions, you ball WILL slowly sink into the platform. Perhaps you can test for the collision with each platform and only if it doesn't collide will your gravity take affect. Only use a downward collision check.

The fastest code is the code never written.

Login to post a reply

Server time is: 2026-07-26 04:27:54
Your offset time is: 2026-07-26 04:27:54