Manual collision detection ?
Hello,
I am currently trying to make a simple custom collision system because I need to be able to set everything to the frame and not in real time. A character jump my be 75 frames long and a kick 15 frames. I only use boxcollider and boxcast to detect collisions.
I already made a micro-physics engine that compute the jumps, projectile, run... but now I need good collisions and I got some issues with that. First of all I am not 100% sure how to use boxcast and secondly I am not sure if it is the best way of approaching the situation.
Should I "simulate" gravity constantly ? (the character is always pushed down) Should I check for collisions before moving the character or after and correcting the position ?
What advice could you give me ?
Thanks
rXp
Why are you doing everything frame based? Do you know which problems it may cause? As long as you won't multiply anything by Time.deltaTime it's not time based.
@Zodiarc I want to make a fighting game engine in Unity. I am an Unreal Engine 4 user but for 2D stuff unity is clearly better so I'm learning while doing here. $$anonymous$$aybe I'm tackling the issue the wrong way but I need frame perfect control on everything. I also needs a very basic but personal physic engine and the collisions that come with it. Depending on the animations I will have different hitbox and hurtbox, the startup frames and recovering frames of the moves must be settable too. The jump gravity must be different for each character but the same if they get hit in the air etc...
If I'm doing things I should not do please tell how I can simplify everything :) Because I feel like I'm taking the long road.
Well I don't have experience in fighting games but this could maybe help https://www.youtube.com/watch?v=vUR7hzamTRs&list=PLO8VSSi-H$$anonymous$$WTpBk7WIEL_iVfyQLebqtiJ https://www.youtube.com/watch?v=mvV$$anonymous$$1RB4HXk https://www.youtube.com/watch?v=n8S3WgVoOmo https://www.youtube.com/watch?v=$$anonymous$$581J4JUGPc
Your answer
![](https://koobas.hobune.stream/wayback/20220612094621im_/https://answers.unity.com/themes/thub/images/avi.jpg)