Skip to content
Gallery
Documentation: Replicated Hitbox System
Share
Explore
Replicated Hitbox System

icon picker
Simple Projectiles

Projectiles - Use our projectile class with an adaptable and modifiable collision shape! You can also modify everything from the damage to the speed and VFX.

Simple Projectiles

image.png
image.png

Setup

Setting this one up is quite simple. All you’ll need to do is open your projectile throwing animation and add the AnimNotify called BP_SpawnProjectileAnimNotify. You can then set the projectile class, which has to be a child of BP_RHSProjectileBase, the attachment bone/socket, the transform offset from the parent bone/socket as well as the projectile speed.
image.png
image.png
If you wish to modify the projectile’s damage, trace channel, visual effects or even collision shape, create an new child blueprint of BP_RHSProjectileBase and you can set these under the Details Panel.
image.png
Since this is originally a child of a C++ class, you can choose from both Cascade or Niagara!
Furthermore, your projectile’s collision shape is adaptable. Simply set the shape you want under the Collision Shape category in the Details Panel.
Sphere Collision
image.png
image.png
Capsule Collision
image.png
image.png
Box Collision
image.png
image.png
❗ Because the root component of any class inheriting from RHS_AdaptableCollisionActor is changed at runtime, there is something important to keep in mind when adding new scene components to the these classes (static meshes, skeletal meshes, FX, etc..): make sure that Component Replicates is set to True!
Otherwise, you will receive some errors in the output log, especially when playing in multiplayer ❗

Setting the Target Direction

In order to set the target of your homing projectiles, you can follow the next steps:
Create a child blueprint of the BP_SpawnProjectileAnimNotify class
image.png
Inside the new class, override the function SetProjectileTargetDirection
image.png
Inside the function, plug-in the direction to your target using your targeting system or in any way you like
image.png
You can use the following script as a reference
image.png
Use your new AnimNotify in your animations

Lyra Setup

Go to your Project Settings
Scroll down to Collision on your left Expand the Preset section and scroll down until you find LyraPawnCapsule (if you can't find it, collapse the section and expand it again)
Double-click LyraPawnCapsule and make sure Projectile is set to Block
Open the AnimNotify BP_SpawnProjectileAnimNotify_Player or create a copy
Open the function SetProjectileTargetDirection and delete the "Check if is aiming" Branch ​
image.png

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.