I’m building a close combat system for my character just like in say Batman arkham city , street fighter or anything related that use this sort of system.
I’m not looking to build anything as complex as street fighter however for a simple punch and enemy receives the punch for example
The approach i’m doing now is attaching box colliders to the hands and feet for now and they all rescaled down to 0 meaning basically there not collidiable. There only collidiable when the punch button is pressed meaning i rescale them up to hittable range.
After this for test purposes I’ve made it so that when the enemy collides with the box it gets destroyed.
So far the whole concept I’ve explained works but its so inconsistent.
The collider doesn’t always collide or enemy doesn’t get destroyed. Basically the collision detection is not really accurate at all if i was to give it a percentage 10% just to be nice lol.
How can i improve collision detection in my case?
I understand everything you've mentioned apart from using a SphereCast to store the fist from the previous frame if i'm not mistaken isit possible to clarify that abit I've almost got a grasp of what your suggesting but not all of it and I believe i can use this tip
– Charles_GamsI'm going to accept your answer because i forgot to add a rigidbody and now collision is great i can finally code my next steps thanks !
– Charles_GamsOh alright i understand now thanks. Isit possible to either write the logic or even a small example in javascript if not then i'm sure i can convert it so that i can get the code logic in my head
– Charles_Gams