BP_LPSP_Projectile
Introduction
The BP_LPSP_Projectile blueprint represents all the projectiles in the asset. It contains all the functionality related to movement, replication, and explosion.
If you seek to access the BP_LPSP_Projectile, it is conveniently located at the following path: InfimaGames/LowPolyShooterPack/Core/Weapons/BP_LPSP_Projectile.
Private Variables
Rotation Update:
Should we update the projectile's rotation every frame using the Rotation (Speed) value? Note: Ensure that the actor's tick is enabled when activating this toggle; otherwise, it will not work.
Rotation Speed:
Rotation values are added every frame to the projectile's local rotation. This enhances the effect of something being thrown, such as a grenade. Please note that the actor's tick must be enabled for this feature to take effect. Additionally, ensure that Rotation (Update) is set to true.
Explosion Distortion Class:
This attribute specifies the type of distortion effect that will be used by the projectile. While most projectiles do not require this, it is necessary for ones that explode in big fiery flames or any other good ol' explosives! Note that it is perfectly fine to leave this attribute unassigned, as it will not break the projectiles in any way.
P.S: We understand that the tone may sound sarcastic, but we assure you that it is not intended as such.
Explosion Distortion Radius:
This value represents how big the distortion radius should be, but it does not directly change the scale. Rather, it helps match it to the radius set in the explosion component on the projectile. Note: Keep in mind that increasing this number will actually make the radius smaller, which is indeed very odd, but we did our very best to account for this quirk...
Impact Surfaces Handle:
This variable contains a reference to a specific row within a surface's data table, which specifies the effects to be spawned for each of the possible surfaces that this projectile can hit.
Update Scale:
Should the projectile change its scale over time? If enabled, the projectile will scale up to the Scale (Max) value, and then slowly scale down to zero and disappear. Note: Make sure that all scaling curves are properly assigned when using this functionality, otherwise it will not work.
Max Scale:
This property defines the maximum scale that the projectile can reach. It is used when scaling the projectile over a period of time, and once reached, it triggers the slow disappearance of the actor. Note that Scale (Update) must be checked for this property to have any effect, and ensure that both scaling curves are properly assigned.
Bounces Range:
This projectile has a minimum and maximum amount of possible bounces on surfaces. Once this number is reached, the projectile will explode and disappear. Note that the final amount of bounces is calculated randomly as soon as the projectile is spawned, and is a number between these two values.
Cinematic Blend Time:
This parameter determines the duration of the smooth camera transition from the player's view to the projectile's view during cinematic mode. It's important to note that this feature won't work unless the projectiles are explicitly launched with bCinematic set to true. Currently, this can only be done from the firing notify inside each character's firing montage projectile firing notify. Although that was a lot to say, it's not as complicated as it may sound - we promise!
Destroyed Actor Delay Range:
This parameter determines how long it takes to destroy the actor after the impulse has been applied. It is useful when the projectile needs to remain on screen a little longer to wait for particles to finish playing or for audio to complete.
Impulse Apply Delay Range:
This is the time taken to apply impulse from the projectile after it "explodes". It is necessary to apply impulse to destroyed objects that are spawned slightly after the projectile hits, as without it everything looks bland.
Debug Explosion Radius:
Should we show debugs for the explosion's radius?
Bounces Max:
This variable holds the maximum number of bounces that the projectile can perform before being automatically destroyed. It is calculated when we launch the projectile using the "Bounces Range" values.
Bounces Current:
This variable holds the current number of bounces that the projectile has performed.
Cinematic:
Enabling this variable will cause the projectile to be followed by a camera that the player can view from. We refer to this as "Cinematic Mode.”
Exploded:
If this value is true, it indicates that the projectile has already exploded.
Result:
This variable contains the resulting impact trace of the object that the projectile just collided with.
Initial Scale:
This value represents the initial scale of the projectile. We use it as a basis for interpolating to some other scale.
Phys Mat Air:
This variable holds a reference to the Physics Material that is checked against the "Surface Handle" value when the projectile explodes in the air.
Functions
Get Owner:
This function attempts to return the owning character of this projectile. This is useful for checking multiple things.
Last updated
Was this helpful?
