Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Advanced Collision Boxes and In-Game Physics
- 6littleman
- Scratcher
100+ posts
Advanced Collision Boxes and In-Game Physics
Okay so I`ve seen many featured project with collision boxes but idk how they do I. Basicly what I mean is, how would I make it so I can make a character that can touch walls and be blocked off from them instead of going through them. Also, how do I make them touch the wall without color sensors if I want to make more advanced terrain pieces for my game.
LOL I think I might of over-complicated that. Sorry!
LOL I think I might of over-complicated that. Sorry!
- drmcw
- Scratcher
1000+ posts
Advanced Collision Boxes and In-Game Physics
The principle is simple, move the sprite then if the collision detection is true move back the way you have come until collision detection is false. How the collision detection works is entirely up to you, all it has to do is return true or false.
- Discussion Forums
- » Help with Scripts
- » Advanced Collision Boxes and In-Game Physics