- Home /
Attacks in action rpgs like diablo and lost ark?
I'm just reflecting over how those games actually deals with attack collisions. By that I mean, their huge weapon attack vfx's. Huge sword swipe vfx's covering half the screen. Or a piercing spear shooting a long vfx spike through enemies. Or a flamethrower effect going out in a cone while rotating to hit as many as possible.
I'm not asking for code or anything, but I would very much like to hear other programmers thoughts on the matter.
How do you think they deal with the actual collision for their attacks?
My own current hypothesis of how to emulate it would be some kind of particle system instantiated by an animation event trigger, and then that the collision is actually made by the particles?
The other approach I'm imagining is simply adding a collider to the character animation, animating it's size and position, fitting the vfx into it.
And how would you go about dealing with it in unity?
Answer by eye776 · yesterday
Nowadays it's mostly collision with transformed bounding volumes (mostly spheres, boxes, capsules) nowadays. If an enemy collides with the attack volume, the attack logic will apply (one time, many times, dps, that's up to you)
A loooong time ago, when 3d bounding volume transforms were expensive to calculate, tile distances were used. The area of effect was calculated in tiles, and for any enemies intersecting those tiles the attack logic would also apply.
Obviously there's other optimizations to apply like octrees so you don't check your volume against every enemy on the map, only those near the Player.
Your answer
Follow this Question
Related Questions
Collider on Bone changes Bone Origin/Pivot 1 Answer
Getting the position/intersection of collided particles 1 Answer
Collision with animations 0 Answers
How to stop an animation on collision 0 Answers