x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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:

alt text

And here's my BP Trigger with the settings for the Trigger component's transform exposed:

alt text

And finally here's my code for spawning the BP_Trigger and setting the Trigger's Transform:

alt text

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.

Product Version: UE 4.18
Tags:
more ▼

asked Mar 11 '18 at 08:50 AM in Blueprint Scripting

avatar image

TorQueMoD
1.2k 86 116 146

avatar image TorQueMoD Mar 11 '18 at 09:04 PM

Ok this just keeps getting weirder. According to a print string of both the location of the BP_Trigger's transform and it's "Destination" (i.e. where I want it to be) their location is the same but the rotation is somehow different. I've tried not using the rotation but this doesn't make a difference.

alt text

avatar image Nebula Games Inc Mar 11 '18 at 10:29 PM

Attach screen shots as separate images so people can see them, that first image with all your nodes is tiny. Can't read any of it.

avatar image TorQueMoD Mar 12 '18 at 05:29 AM

Sorry Nebula, thanks for the attempt at helping though... If you right click on any screenshot on the answer hub and choose "Open in new Tab" you can see it full screen and use your browser's zoom.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

alt text

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

more ▼

answered Mar 12 '18 at 05:34 AM

avatar image

TorQueMoD
1.2k 86 116 146

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question