I’m looping MoveTo() with the player positions on VFX Spawners, but what happens is that the MoveTo function doesn’t move the device directly into the player or directly at the position provided; it sort of just moves close to the player. What this ends up doing is the VFX doesn’t get put directly onto the player, but a bit further away, which is not what I want. Is there any way to move the VFX Spawner directly into the player?
Here is an example with a teleporter device of where the device ends up around the player when using MoveTo
and here’s the code
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Game }
using { /Fortnite.com/Characters }
wallhacksdevice := class(creative_device):
@editable var heroTrigger : trigger_device = trigger_device{}
@editable var vfxSpawner : vfx_spawner_device = vfx_spawner_device{}
middleMan (dude : ?agent):void=
spawn:
vfxFollow(dude)
vfxFollow(dude : ?agent)<suspends>:void=
if (ValidDude := dude?, FChar := ValidDude.GetFortCharacter[]):
vfxSpawner.Enable()
loop:
if(FChar.IsActive[]):
playerLoc := FChar.GetViewLocation()
playerRot := FChar.GetViewRotation()
vfxSpawner.MoveTo(playerLoc, playerRot, 0.1)
else:
vfxSpawner.Disable()
break
OnBegin<override>()<suspends>:void=
heroTrigger.TriggeredEvent.Subscribe(middleMan)
Also, the VFX is custom made using Niagara. Thank you so much