Announcement

Collapse
No announcement yet.

Creating moving platforms w/ Timeline that can be placed anywhere

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

    Creating moving platforms w/ Timeline that can be placed anywhere

    Hi Everyone,

    So I'm working on creating some moving platforms that I can place anywhere in my level.

    The problem I'm having is I've got my platform moving but it always snaps to the exact location I have entered in the default values.


    Click image for larger version

Name:	default_setting_for_platform.png
Views:	1
Size:	38.1 KB
ID:	1140409


    So basically I cannot place it wherever I want.





    Here's my blueprint. I'm guessing I need to some how set some kind of offset for the location?


    Click image for larger version

Name:	final_platform_blueprint.png
Views:	1
Size:	116.2 KB
ID:	1140410



    Any ideas? I even tried the Lerp Translate but that would not work either
    Last edited by artbywaqas; 11-03-2014, 10:54 PM.

    #2
    Hello,
    Do you want to place it everywhere you want in your level or only from -200 to 300 ?
    Last edited by Fen; 11-03-2014, 11:50 PM.

    Comment


      #3
      I want to be able to to place it anywhere in my level and have it working wherever I place it.

      Comment


        #4
        Ok, if this is a blueprint with only your platform in it, then on begin play, can't you just "set actor world location" where you want and then play the timeline ? Or if this is on build, just create a blueprint with your platform in and set it where you want in your level ?
        Last edited by Fen; 11-04-2014, 04:47 AM.

        Comment


          #5
          No, I get it, since he's using two position vectors for the timeline, no matter where he places it, it moves its location to those vectors. Note that an actor (evidently) can't have a relative location, only a child component (since it's relative to parent; an actor or root component's relative location is relative to the world)

          Try this: in the Construction Script, use a "get location" node and some vector addition to Set the "Up" and "Down" variables to the object's start location plus or minus some Z value.

          Since the Construction Script is only run when the object is built/updated/moved, rather than during its play, this will define the positions the platform moves to relative to its start location. Use a second pair of exposed variables to control the nature of that movement (e.g. you would add the Get Location output to Get UserStartPoint and UserEndPoint to get the Set StartPoint and EndPoint values actually used by the Construction Script; by exposing UserStartPoint and not StartPoint, you can allow each platform to specify in-editor some amount of X, Y, and Z movement which will be automatically added to the platform's placement data)

          Comment


            #6
            Oh ok, thanks RythmScript ! I didn't know that. But wouldn't it be easier and faster to set the platform in a blueprint under a box root and set the blueprint in the level like any other actor ? (what i thought it was because of the scene component relative location and why i didn't understand the trouble.)

            Comment


              #7
              If I may plug our free plugin a bit shamelessly here, you can do this with iTween: https://forums.unrealengine.com/show...-in-UE4-iTween!

              Place an Actor Move From/To node on your blueprint platform that runs on Event Begin Play. Set the From vector as the actor's location, then set the To vector as its location +/- 500. Set it to a Back-and-forth loop with an easetype of something like "Ease In and Out Quadratic" and maybe a little delay if you want between each move up/down. It's easy and you'd be able to place it anywhere.
              iTween For UE4
              Procedural pathed animation for actors, components & UMG - $0
              Runtime DataTable
              DataTables dynamically loaded from text or Google Sheets while your game is running!
              easyCSV
              Fast, cheap, and accurate CSV parsing at runtime!

              Comment

              Working...
              X