English Wall Collision Example

4 replies
Goto Page
To the start Previous 1 Next To the start
24.06.20 02:31:55 pm
Up
The Dark Shadow
User
Offline Off
As in so you don't go through sprite when you walk up to it, So could anyone write me an example of this, please? Thanks
24.06.20 05:13:29 pm
Up
Cebra
User
Online On
https://tutorialedge.net/gamedev/aabb-collision-detection-tutorial/

This is a basic Version of collision detection
loading...
24.06.20 09:51:28 pm
Up
The Dark Shadow
User
Offline Off
I see, but it's not exactly what I want. Thanks anyway
06.07.20 01:15:31 am
Up
cs2d_is_a_Gem
User
Offline Off
Obviously it is not exactly what you are looking for, but you should start with the basics.
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 06.07.20 01:51:19 am
06.07.20 11:28:23 pm
Up
VADemon
User
Offline Off
I had written a small script here it was for a flying freezing arrow that slows down players on hits and when it hits a wall it gets removed.
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!
To the start Previous 1 Next To the start