Set Trigger Transform not working?
I'm working on creating a random spawning system for a blueprint that has a trigger volume component inside it. I've got a spline in the world that I am spacing 2 arrow components at a random distance along and then using the World Location of these to spawn the Trigger Blueprint and set the location of it's trigger volume. Spawning the blueprint actor on the first arrow is working fine but for some reason the trigger is not moving to the world location of the second arrow... it seems to be in a random location every time and I can't understand why.
Here's my code to position the Arrow transforms in the world:
And here's my BP Trigger with the settings for the Trigger component's transform exposed:
And finally here's my code for spawning the BP_Trigger and setting the Trigger's Transform:
As I said, the BP_Trigger is positioned correctly so I know the code works and I can clearly see both arrow components in the world because I set them to be visible in game but why it's not moving the trigger volume into the correct position is beyond me. Any help figuring this out would be greatly appreciated.
I should also mention that I can move the trigger's transform manually without issue.
This is why you shouldn't code with a lack of sleep. I'm stupid and I set the Trigger transform in the construction script to "Relative" instead of World. So it's been moving relative to the location of the root rather than to the correct position in the world. Which is why I could move it where I wanted manually but not procedurally. URGH. I feel dumb :P
answered Mar 12 '18 at 05:34 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here