Getting Started
1- Setup your project
This section is used to set up a default configuration for the LaserComponent.
1.1 - Edit your project settingsIn Project Settings > Engine > Collision |
1.2 - Edit LaserComponentIn Content > AdvancedLaserSystem > Blueprints > SC_LaserComponent |
1.3 - Setup the name of your Niagara parameters |
1.4 - Explanation of the parameters
|
How to use
1 - Add the SC_LaserComponent Don't forget, the laser's forward direction is along the X-axis. |
2 - Setting up the appearance |
3.1 - Change the laser settings |
3.2 - Explanation of these parameters (These parameters are usefull for the next section)
|
4.1 - Niagara parameters You can set these parameters for each laser, just like in the first section.
|
4.2 - Reminder - Required
- Optionnal (If you use your own niagara system)
|
Communicating with lasers
1 - In the laser component you have access to two Events Dispatcher
1 - On Retrieved Laser Hit With this Event Dispatcher, you can retrieve hit information on the surfaces hit. If you have set Laser Hit on Tick to true, this event will be called every tick. |
2 - On Lost Laser Hit With this Event Dispatcher, you will be notified if the hit is lost. |
Also, you have the Index Hit that you can use to differentiate between two hits on the same actor.
2 - Blueprint Interface BPI_LasersCommunication
1 - Event Received Laser Hit In contrast to the event dispatcher, you can receive the hit of the laser. For example, you can activate something when the laser hits it. Additionally, you can activate something only if the laser has the correct Laser Name, Emitter, or Laser Component. |
2 - Event Lost Laser Hit You can also do the same as OnReceivedLaserHit when losing the hit. |
Configure the surfaces
The surfaces can exhibit two behaviors: reflection or passthrough. To do this, you have to add a component Tag : Reflection or Passthrough (Not case-sensitive.)
1 - Reflection The static mesh will reflect the laser as many times as the max bounces variable is configured. |
2 - Passthrough
What is the difference ? If you used the tag, you can retrieve the passthrough hit. |
Glossary
1 - Enable To enable the laser
|
2 - Set Actors to Ignore You can specify to the laser which actors can be ignored by it.
|
3 - Enable and Set Actors to Ignore
|
4 - Set Laser Name
|
5 - If Damage Caused By Laser This macro is usefull for the Event AnyDamage to define if the damage causer is a LaserComponent
|
Use it like so:
|
Multiplayer
If you want to use this component in multiplayer, you have to call the Enable function on the server |
Don't forget to check Replicates on the owner |