smurfmx on DeviantArthttps://www.deviantart.com/smurfmx/art/Simple-collisions-6854862smurfmx

Deviation Actions

smurfmx's avatar

Simple collisions

By
Published:
200 Views

Description

I did this just to see if it could be done. Instead of doing complicated math to do the collisions instead this runs off a class that uses vectors. So when a collision occurs it simply swaps vectors. I know not the fastest or most accurate way (I have to say it looks pretty good). The code is heavily unoptimized so it will probably run slow for anyone under a 1ghz system. I could just use a for in and write a big switch statement and run through that and return true if it has hit any of them and false if it hasn't I'll try that and get back on it.
Image size
550x400px 2.82 KB
© 2004 - 2024 smurfmx
Comments0
Join the community to add your comment. Already a deviant? Log In