Announcement

Collapse
No announcement yet.

Reset Mesh

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

    Reset Mesh

    I am sure that the answer is probably really simple...But I cannot find an answer for it. I have set of spears that I am "shooting" down a hallway using timeline, right now they stick in the wall were they hit, but I want o have them either reset back to their original position after a delay or if I have them destroyed I want them respawned back to their original position to be re-used by the pawn when he steps into a collision box. I figure that I should be using GetActor Transform and SpawnActor nodes but I am not sure how they interact....

    Here is my current BP...

    Let me know what you all think??

    Click image for larger version

Name:	SpearTrap.png
Views:	1
Size:	122.9 KB
ID:	1140406

    #2
    Hello,
    I used something similar for a door elevator closing after a delay :
    If you want a slow movement back, then from your first timeline (spearmovement), you can drag a wire from "finished" node to a branch with a variable "back" to a delay and a second timeline, same as the first one but with a longer time (like 5 secs ). At the end of the delay, you set the variable true and play the timeline ( and play a click click click audio ^^). You connect your end overlap event there too. And don't forget to set your variable to false on begin overlap. Then your spear will back up or on end overlap or after a delay.
    If spear is destroyed then you just set "back" to true. (but you will have to use play from start if not you may have weird effect. I haven't tried that part.)

    edit : you may have to set / check "back" too on begin overlap.
    Last edited by Fen; 11-03-2014, 09:05 PM.

    Comment


      #3
      Hey Fen....

      Okay so I did what you suggested ( I think)...
      I took the FINISHED node and dragged it out to the DELAY (at the bottom of the picture) ... But they Disappeared...I am assuming that the Set Actor Location sent them to 0,0,0...I am suspect that I need to somehow hold on to the location of the original location of the spears But I am not sure how to do that....

      So I tried this:

      Click image for larger version

Name:	SpearTrap2.png
Views:	1
Size:	155.2 KB
ID:	1060559


      but it did not return them to the original position because the world Position is now the new location...

      Thoughts?

      Comment


        #4
        Here is the global idea i was thinking about : I just tried it and it worked: you'll need to set locations and times to have the effect you want. I used a float in timeline and a box as root with the starter content door and i set relative location.
        Click image for larger version

Name:	3.png
Views:	1
Size:	375.0 KB
ID:	1060562

        Comment


          #5
          Fen...
          What is our BACK referring to??

          Comment


            #6
            Also Why did you use a Float for Time instead of Vector??

            Comment


              #7
              Back is just a bool i set to not have first timeline playing as the other one is not finished and to not have delay activating when i did end overlap or the opposite. And i used float because it was easy to set and i was not sure of vector value and didn't want to spend time checking it.

              Comment


                #8
                Interesting....Thanks for the help on this...after working through this and getting it to work this way...I have realized this is not really what I want for this specific BP. This is gonna be great for traps that jut from a wall then move back into that wall...But for this BP what I need to do is be able to launch these spears down a hallway, have them stop when they hit a collision either with the pawn or the wall at the end and then respawn back at the origin point. Which I thought by using timelines was the way to go...it possible still is...but I am not sure.

                I am thinking that my answer is in the FP blueprint projectile BP.....but I am not sure...

                Any Ideas???

                Comment


                  #9
                  If in you first timeline, you use reverse on "event hit" it would work. But you need to hit the floor / wall before the end of the timeline to have it always working because using reverse at the end of play will do an infinite loop. (This is the first idea i would try)

                  Edit : like in Tim Hobson tutorial : https://forums.unrealengine.com/show...l=1#post122815 but with an event hit instead of event end overlap and a lerp vector instead of a lerp rotator for location

                  You may have some set up to do with collision settings too, i don't know.
                  Last edited by Fen; 11-04-2014, 12:05 PM.

                  Comment


                    #10
                    Out of curiosity what is your boolean holding?? Any value? ?

                    Comment


                      #11
                      For this, you'll not need any boolean or second timeline i think. Only the first one with reverse and ground / wall collision set to have the reverse effect before the end of the timeline.

                      Comment


                        #12
                        Hey there Fen...umm..I seem to have run int a small issue...I cannot replicate your node fro your Static Mesh into Relative Location Node as you have it with the Even Begin play....I had it last night but UE crashed on me and I shut down after and went to bed....


                        Nevermind.....smacks head

                        Comment


                          #13
                          i got trouble with that too : this is under variables / transform with context sensitive.
                          Last edited by Fen; 11-04-2014, 02:29 PM.

                          Comment


                            #14
                            Alright Recreatd your BP...When I debug No connects are begin made past the branch linked to EVENT ACTOR BEGIN OVERLAP It just stops there....

                            Ideas??

                            Comment


                              #15
                              I would say, you are cursed, call a sorcerer

                              Maybe your root box is too small (as you can't change its side, use box extent. And set it visible to test it.) Then check your collision status. And if you use "back" check that it is false on start.

                              Comment

                              Working...
                              X