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
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.
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.
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
Capsule Collision
Box Collision
❗ 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
Inside the new class, override the function SetProjectileTargetDirection
Inside the function, plug-in the direction to your target using your targeting system or in any way you like
You can use the following script as a reference
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