Page 1 of 1

Collision using a region instead of character

PostPosted: Sat Dec 28, 2013 1:05 am
by arcreamer
Hey guys, so Im working on a collision with my actor so I can create gravity so what I have done was created a filled region for the ground collider, and another filled region for my player collider. Im not very experienced at all with programming, so I probably went about this all wrong, but then I parented my player to the player collider, and in the collider I put if in the Draw Actor:
Code: Select all
if (yvelocity<4)
{
    yvelocity+=.08;
}


when I played the game, it did what I wanted to do at first which was have the player collide against the ground and the reason I knew he collided was because I placed him a few feet off the ground before playing. But once I started walking, I was able to walk right off of the edge of the ground and wasnt falling. its as if the collider just stopped working or something.. not sure. Ive been looking for some good collision tutorials but none with using a region as a collider instead of the actual player. any help would be great

Re: Collision using a region instead of character

PostPosted: Thu Jan 23, 2014 9:52 am
by barney12345
if you want gravity, just use draw actor, script editor
Code: Select all
yvelocity++;

and then use collision on any side of ground, physical response, (going down in order of numbers) 1,1,0,1.
Also don't forget to make the filled region the parent, although making collision with that might be a bad idea.