Announcement

Collapse
No announcement yet.

Get ball into trigger blueprint

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Get ball into trigger blueprint


    Hello everyone, This is now to my problem. I said that I did a lot of research on the Web before finishing here I make a little game on Unreal Engine while blueprint. I already have a map with the horizontal movement management of my ball. This ball is a third character Character: Here are blueprint:

    PICTURE 1


    It can be seen that I apply a change of X, Y, Z coordinates to my Actor "ball", and everything works perfectly. Where it gets complicated is when I want to add a trigger on my map like this:

    PICTURE 2


    This trigger will allow me to make some movement on my Actor "ball" when it touches the trigger. Here is the blueprint of the trigger I made:

    PICTURE 3

    Normally the change of coordinates X, Y, Z should apply to the Actor "Ball" .. instead, here is the error message that I get when starting the simulation:

    PICTURE 4


    I guess I do not have access to the Actor "ball" in the trigger's blueprint. But I tried a lot of things, but I did not find the way to recover my "ball" to be able to apply to him are movement at the launch of this trigger ...

    Thank you in advance for your time and help,
    Good day.





    #2
    You have to give the 'ball' variable a value. Click on it, in the editor, and then choose your actual ball...

    ( your 2nd picture, see how the ball variable is blank? )

    Comment


      #3
      Hello,


      I do not understand what you mean. My variable "ball" should be accessible in general no? I do not understand how to give it a value. I am really a beginner sorry

      First picture show the variable in the trigger ... but don't contains the object "ball" ... there is the same error :/

      The second picture show the good "ball" in the begining of the game. This is this "ball" I want to get in the trigger ... but it's a fail :/

      One idea ?

      Thanks you for your help
      Attached Files
      Last edited by thibaut2121; 05-26-2019, 04:30 PM. Reason: Add pictures

      Comment


        #4
        You'll see your Overlap node has a OtherComponent output, this should be the Ball mesh, you can set your "Ball" variable before trying to use it in Move Component to
        SolidGasGames

        Comment


          #5
          Telimaktar In your second pic ( original series ), you have the trigger box blueprint selected, and you can see in the world outliner ( on the right ), there is a reference to the ball variable ( because you made it visible ). Is has the word 'none' and a blank square, this is why you get the 'none' error, because you have not assigned an actual ball to the variable.

          You either have to put your ball in the scene and then you can click on the variable and connect them together, or you have to spawn your ball in BP, in which case you can assign the ball variable then.

          Either way, the overlap node has an output 'other actor' - this is the ball - you can assign it to the ball variable there also. ( you can check it really is the ball with casting, but that's another matter ).

          Comment


            #6
            ClockworkOcean Think you confusing the OP with me
            His Ball variable is a mesh component though, I'd recommend changing this variable to the BallActor instead, and use the Actor directly instead of its component, currently this will create other side-effects since the component's relative location is offset from its parent, assuming that is not the intention.
            SolidGasGames

            Comment


              #7

              Thanks a lot for your help indeed the output "other actor" corresponds to the ball! Resolved!

              Comment


                #8
                Telimaktar Sorry! - it is Monday after all...

                Comment

                Working...
                X