Touched VS Query VS Shape Casts VS Region3

What would be the best for creating VFX heavy hitboxes for a fighting game’s abilities.
If each of them would have their own purposes it would be nice if someone told me what kind of abilities require a different type.

1 Like

Region3 functions for detecting parts is deprecated and are replaced with spatial query. So we don’t talk about it.

Spatial Query is just for detecting parts, doesn’t tell you anything else. Useful for scanning an area for area-of-effect attacks. But if the attack can be blocked by a wall, you should use raycasts.

Shapecasts is good for projectile frameworks because it tells you the hit position and surface normal, useful for implementing ricochet and other terminal ballistics mechanics.

Raycasts have the same purpose as shapecasts but for one-dimensional projectiles. Raycasts are also used for AOE that can be obstructed, i.e. a grenade doesn’t hurt you through a wall.

.Touched is for general use cases and is applicable to a lot of things, mainly just hitbox and hurtbox detection.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.