# how to setup Beam End in Niagara System by C++ 

**URL:** <https://forums.unrealengine.com/t/how-to-setup-beam-end-in-niagara-system-by-c/2695550>\
**Category:** Programming & Scripting\
**Tags:** beam, unreal-engine, CPP, question\
**Created:** [January 28, 2026, 6:02pm UTC](https://forums.unrealengine.com/t/how-to-setup-beam-end-in-niagara-system-by-c/2695550 "2026-01-28T18:02:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Merab331](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Merab331](https://forums.unrealengine.com/u/Merab331)\
**Post date:** [January 28, 2026, 6:02pm UTC](https://forums.unrealengine.com/t/how-to-setup-beam-end-in-niagara-system-by-c/2695550/1 "2026-01-28T18:02:14Z")

</div>

I create Niagara System by tutorial Beam Effect and trying to set Beam End in code like:

`NiagaraComponent->SetNiagaraVariablePosition( FString( “User.BeamStart” ), GetActorLocation() );`  
`//NiagaraComponent->SetNiagaraVariablePosition( FString( “User.Beam_End” ), end );`  
`NiagaraComponent->SetNiagaraVariableActor( FString( “User.Beam_End” ), Target );`

I try use position traget and use Actor but it’s dosnt work. But if I set Source Actor in Niagara Component(by tutorial) to any Actor it’s work. How i can set position or Actor in code?

---

<div class="post-metadata">

**Author:** ![Countsie](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/countsie/32/1194632_2.png) [@Countsie](https://forums.unrealengine.com/u/Countsie)\
**Post date:** [January 28, 2026, 8:17pm UTC](https://forums.unrealengine.com/t/how-to-setup-beam-end-in-niagara-system-by-c/2695550/2 "2026-01-28T20:17:57Z")

</div>

NiagaraComponent-\>SetNiagaraVariablePosition( FString( “User.Beam\_End” ), Target-\>GetActorLocation() );

Assuming your User.Beam\_End expects position data, not an actual actor reference
