Sword collision detection

I’ve been pretty lazy with the collision detection of the sword. This is because I’ve had the benefit of only having to do collision detection between boxes that are arranged up-down left-right. Imagine a square or rectangle that is flat on the ground. Unfortunately the sword, whilst remaining a rectangle, is only rarely aligned along the x and y axis. This makes collision detection much harder and actually involves some non-trivial vector math. Having said that, I can always just go to per-pixel collision detection, or just fake it, using some tricks I’ve thought up.

As you can see, there’s one point where the sword is clearly clipping through the object and yet not responding to it.

Also, and while this is a small thing, it’s pretty awkward how the sword seems less like a sword, and more like a cow-catcher that you just kind of plow through things with. I hope no one was getting the idea that this was a polished product just yet.

This entry was posted in Monochrome. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s