- Home /
Question about melee combat 3D
There are several ways to achieve melee combat in unity but witch one is the easiest to implement and suits best for mobile devices? This is what I had in mind: using a collider on a sword and using the hit point to determine where the (blood)particles should play and what (hurt)animation the enemy should use. However witch colliders should I use, where is the best way to put them or spawn them, should I only use one big capsule for the player or smaller ones? What would u recommend me?
Extra Questions: 1.is it possible to detach a part of the enemy's rig in combat? 2. How can I determine if the smoke from the dragon hits the player since it is slower traveling (as a bullet).
Answer by xxmariofer · Jul 31, 2019 at 02:58 PM
The simpler the collider the best. If you can use a Box collider use the box collider. Less edges better performance, so one big collider is much more efficient than multiple little ones, but is less precise obviously. BUT a few simple colliders for each (for example arms, legs, etc) is better than one complex mesh collider with more edges. for the fire you can use for example 3 rays, from the mouth of the dragon, forming a triangle, and make the lenght bigger iover time. The best advices i can give you and most impactfull is use the collision matrix since the start