Use this basic method made be pyro for collsions
Collision->top side->ground->with repeat yes
- Code: Select all
double mem = xvelocity;\\holds the current xvelocity
if(yvelocity >= 0)//if your falling
{
PhysicalResponse(MOVE_EVENT_ACTOR_ONLY, USE_CALCULATED_MASS, 1.000000,1.000000, 0.000000, 1.000000);
xvelocity = mem;//reset the xvelocity so you don't glitch up
jump=1;//reset jump variable
}
Collision->bottom side->ground->with repeat yes
- Code: Select all
double mem = xvelocity;
if(yvelocity < 0)//check if moving up
{
PhysicalResponse(MOVE_EVENT_ACTOR_ONLY, USE_CALCULATED_MASS, 1.000000,1.000000, 0.000000, 1.000000);
xvelocity = mem;
}
Collision->left or right side->ground->with repeat yes
- Code: Select all
double mem = yvelocity;
PhysicalResponse(MOVE_EVENT_ACTOR_ONLY, USE_CALCULATED_MASS, 1.000000,1.000000, 0.000000, 1.000000);
yvelocity = mem;
as for moonwalking you'd have to show me the .ged so i can see how you have it set up, and make sure you are using xvelocity and yvelocity when moving the actor instead of just chaning the x position (xvelocity=3; instead of x=x+3; or x+=3;)