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"

"Cast to..." an actor object wildcard question

HI folks! I'm trying to setup an interface, some sort of popup menu, that spawn when a line trace hits something that implements an interface. When it does, if i click a button in the popup menu, the thing should be changed into something else (i.e. a cube into a sphere).

Actually i'm trying to setup the binding of the button through a cast to get the transform of the object hit by the line trace, but there's the problem: i don't know what to plug into the object wildcard pin!

I need a specific answer to understand if the process or the logic behind it makes sense or not, because I'm starting to think that it's wrong and i should figure something else...! Here's a screenshot of the actual situation. alt text

Product Version: UE 4.18
Tags:
testing.jpg (108.9 kB)
more ▼

asked Feb 18 '18 at 09:51 AM in Blueprint Scripting

avatar image

Lacrima
5 2 3 6

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

1 answer: sort voted first

the object pin needs to be a specific reference to something in the level in this instance. i assume your doing the line trace from the player character. if you are then you will just need to create a variable of type actor and make its value the actor that was hit by the trace. then in your widget get a reference to the character (get player character) cast to the player class type (thirdpersoncharacter or whatever yours is) and get the value of the variable created.

more ▼

answered Feb 18 '18 at 04:29 PM

avatar image

ThompsonN13
10.4k 34 10 27

avatar image Lacrima Feb 18 '18 at 08:54 PM

I'll try this as soon as possible, thank you for dropping by with such a clear answer!

avatar image Lacrima Mar 05 '18 at 02:35 PM

I had little time to work on my project, btw i tried your suggestion and it worked, thank you so much!

(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