Making an actor's movement follow the ground
Hi,
I am having trouble making an actor's movement follow the ground. I want to create many actors (non player actors) that come out onto the screen and basically "walk" on the ground. If the ground has a "ditch" I want the actor to fall into the ditch but not through the ground. It will be like a platformer but this is for the non player actors.
I have tried use the "move to" commands and the "accelerate" command together in the rules and collide. The reason I have tried to use the Move To and Accelerate is because when I created a "speed bump" (using collide) my actors fly off when they hit it and don't return to the ground. I added the accelerate as an alternative to using scene gravity. But it seems like accelerate just makes the actors fall through the ground even though there is a collide function and move to function.
So I have this non player actor now using the move to (x is to a specific point while the Y i would on self position), accelerate (270 for downwards towards the ground and relative to scene) and collide when hit ground.
I am new to this and watched some tutorials. If anyone has an easier way to do this I would greatly appreciate it. Thank you.
I am having trouble making an actor's movement follow the ground. I want to create many actors (non player actors) that come out onto the screen and basically "walk" on the ground. If the ground has a "ditch" I want the actor to fall into the ditch but not through the ground. It will be like a platformer but this is for the non player actors.
I have tried use the "move to" commands and the "accelerate" command together in the rules and collide. The reason I have tried to use the Move To and Accelerate is because when I created a "speed bump" (using collide) my actors fly off when they hit it and don't return to the ground. I added the accelerate as an alternative to using scene gravity. But it seems like accelerate just makes the actors fall through the ground even though there is a collide function and move to function.
So I have this non player actor now using the move to (x is to a specific point while the Y i would on self position), accelerate (270 for downwards towards the ground and relative to scene) and collide when hit ground.
I am new to this and watched some tutorials. If anyone has an easier way to do this I would greatly appreciate it. Thank you.
Best Answer
-
Photics Posts: 4,172
Personally, I prefer the accelerate method to simulate gravity. Although, with multiple actors affected by gravity, it might be better to use the gravity settings. I'm not sure if that's the issue though. How is this ditch being created? Are you using multiple actors?
While not exactly the same, I created terrain collisions in BOT with invisible actors. Basically... one actor is a picture of the scene, and then invisible circles and rectangles/squares lay on top of the picture.
Here's a link to an article that I wrote about hitboxes...
http://photics.com/hit-boxes-using-rectangles-to-make-complex-shapes
Answers