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"

How to access decals components

Hello guys, im trying to access decals that im creating with a actor BP, i want to be able to move them x Units. For some reason they are getting stacked up. Any tips to solve this issue?

This is the blueprint: alt text

alt text

i also made a small mp4 so you can see the problem inside the editor https://gyazo.com/715635241af82e849522571ddf621f05

Thanks for the time, Cheers

Product Version: UE 4.19
Tags:
more ▼

asked Jul 10 '18 at 07:48 PM in Blueprint Scripting

avatar image

IvoMR
28 1 7

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

1 answer: sort voted first

I think you ARE accessing them and you ARE moving them in the blueprint you've posted.

However, you are creating them at exactly the same spot and you are moving them all exactly the same distance so they all, again, end up at the same spot 10 units away from the parent actor's transform.

Now I'm not quite sure what you are trying to achieve here but if you take the NewLocation vector in the SetRelativeLocation node from a variable and you multiply that variable by the index in your ForEachLoop they should start to spread out in the direction of the vector.

BUT... You are doing quite a lot of unnecessary work making this more complex than it should be.

You don't really need anything after the AddDecallComponent node.

The RelativeTransform variable in AddDecallComponent node can be used to place the decals in exactly the right position. (Just don't forget to move the transform after you place a decal otherwise you will have the same problem.)

You can create a transform and manipulate it (move, scale and rotate it) or outright build it in place before you add the decal which will be much simpler and avoid 2 loops.

If you would need these decals later in your game, you can store them in a specific array after you create them instead of taking all components and looking for a tag.

I hope this is clear enough. Happy coding :)

more ▼

answered Jul 10 '18 at 10:33 PM

avatar image

dZh0
1.3k 6 5 10

avatar image IvoMR Jul 11 '18 at 11:38 AM

Thanks, i dont know how i missed that relative transform in that node! Its Working now!! https://i.gyazo.com/8c83bc0e95f0609e5f50df5b372fa8e4.mp4

avatar image dZh0 Jul 11 '18 at 12:38 PM

Glad I could help :)

(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