Help - Search - Members - Calendar
Full Version: Gm Physics Platforming Problems
Game Maker Community > Working with Game Maker > Advanced Users Only
ShintoKyousha
I have my main object moving by add_force(h,100,0,FORCE) for left and right (left being -100) and he moves along fine but when he is moving along my static platform, he tends to jump or bump around. The main object is set_body_frozen_rotation(h,1); and both objects materials have 0 static and dynamic fiction. I cant seem to pinpoint exactly why this is happening.

My second question, is can i make shift an actor that interacts with objects? I have my main characters code all sorted out, and would love it if he could interact with other physics and yet his physics box stays with him?
cooldudetb
QUOTE (ShintoKyousha @ Oct 30 2009, 09:59 PM) *
I have my main object moving by add_force(h,100,0,FORCE) for left and right (left being -100) and he moves along fine but when he is moving along my static platform, he tends to jump or bump around. The main object is set_body_frozen_rotation(h,1); and both objects materials have 0 static and dynamic fiction. I cant seem to pinpoint exactly why this is happening.

If your platform is made up or multiple physics objects, a physics object sliding along will jump a bit when it hits the next part of the platform. If your platform is only one physics object, then I'm not sure what could be causing this.
QUOTE (ShintoKyousha @ Oct 30 2009, 09:59 PM) *
My second question, is can i make shift an actor that interacts with objects? I have my main characters code all sorted out, and would love it if he could interact with other physics and yet his physics box stays with him?

I don't get entirely what you are asking. "make shift an actor that interacts with objects"? Please elaborate.
1dinglenuts1
if hes bumping and jumping on a static object, put the closest pixel, 1 pixel away from the static object.

sumthin like

CODE
//step
if distance_to_object(obj_static) < 1
{
    x+=1;
}

sumthin like that
raydiddy420
You could try to handle collisions in the step event, it may be that the built in collision system always puts you back at previous x and y coordinates causing you to bounce.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.