My game has a punch system and it looks super stupid when your fist just phases through the person and I have no idea how to make this look better. Could you guys give me some ideas on what to do.
Are you using an Animation object to make the characters punch?
Yea I am using animations (I do not like comment limit)
Ah ok. In general, things like these are done procedurally, meaning we define the animation with code instead of an Animation object. That way, we can alter the animation on-the-fly. However, that’s not fun to do, and I think it would be in your best interest to try to fake it with an Animation.
So to detect if you punch a player, you could cast a small ray from the player’s fist every frame. Once the fist hits something, stop the animation. The problem then becomes that stopping the animation probably looks pretty goofy. Does the full body move for your animation or only the arm? Maybe you could have one animation for the body and one animation for the arm. That way, you could only stop the arm from moving and have the rest of the body finish the punching motion.