Forum
 
 
Scripts 
 Wall Collision Example
 Wall Collision Example
4 replies
 
 1 
 
  This is a basic Version of collision detection
  If you do not understand the basics as you intend to understand something more advanced, and if someone wants to help you, they must make what you are looking for compatible with what you already have.
edited 1×, last 05.07.20 11:51:19 pm
I had some simple (very simple...) collision detection logic there. Not optimized or anything (except that the arrow checked for collision only on every 3rd tick (LINE 84))
You want a custom collision with an image. It's hard because:
 You have to setpos (teleport) players backwards, and it will be laggy for them
 Images can have arbitrary shapes - that's not easy. If your image is a rectangular or a circle only then it's simple.And if you have too many custom collision objects, you will run into performance problems. So eventually you'd end up with AABB and other optimization techniques.
Have fun hacking!
 
 1 
 
 Offline