Announcement

Collapse
No announcement yet.

move actors (including characters) around - path made during game

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

    move actors (including characters) around - path made during game

    Hi!

    Today I thought about a sick spell for my game.

    Basically I want to "cast" a round shape (plane, cylinder or sphere...). All characters in that area should get moved onto the other side of that space in a curvy path over the top.

    Here a sick sketch to explain better what I mean.

    Click image for larger version

Name:	yoser.jpg
Views:	1
Size:	61.7 KB
ID:	1151864

    Now I thought about a few ways how this could possibly be made but in this field I am lacking knowledge. Idk what function is best to use to move the actors (no physics actors, its characters etc too) and calculate paths.
    BTW its also not important that they go over the middle, or in a perfect line, just swap sides and go in the air.


    I thought I could get location of the object to move, and its distance to the middle of the spell. Then create a spline with the starting point "actor location", as endpoin the vector "object to middlepoint *2" and as the spline curvepoint the middlepoint + distance from object to move to middle point, wich should give a nice curvy path. Now idk how to best get all those things and move the actors along them.

    And my biggest worry with this first idea is if that is even suitable if we are thinking about a multiplayergame - there could be 10 actors inside this being moved around, so calculating 10 splines and moving the actors along them per tick event as I have seen parts of from google searches is probably too heavy. So id also like people who could estimate how costly such a thing would be tell me if its easy before i put hours into working it out only to find out that I need a 17 core cpu to calculate it.

    big thanks for any help in advance

    #2
    You don't need a spline for it, you just need to use some math and you can make the object move along an arc fairly easily from a certain position. Haven't got time to do a proper example but have a bit of a search at rotating objects around a circle and that should get you started.

    Comment


      #3
      Well i found this:

      https://answers.unrealengine.com/que...ease-help.html

      As I said, sth like this would probably do it, the problem is that I dont know if this is suitable for a fast paced multiplayer game, you are looking at maybe 10 actors that have this happening to them at the same time, and thats just 1 player using 1 spell. (and I know "get actor location" is not cheap to use at tick for 10 things considering its only one spell from 10 players)
      Last edited by t0b4cc0; 06-17-2015, 06:11 AM.

      Comment


        #4
        i worked something out that does half the job already (spawn emitter here is just used to showcase it gets the vectors right)

        Click image for larger version

Name:	graph.png
Views:	1
Size:	578.7 KB
ID:	1080006

        it doesnt take it to the last point though eventhough its calculated correctly as you can see here:


        Click image for larger version

Name:	pic3D.jpg
Views:	1
Size:	196.8 KB
ID:	1080007

        also if theres more than one actor in the array it only does it for one of them.
        Last edited by t0b4cc0; 06-17-2015, 10:06 PM.

        Comment


          #5
          allright after fiddling around forever i gave up. Apperently foor loops just start over with the next element when they hit a latent node. So i made a custom event that gets input for all the data needed (the 2 vectors and the capsule) this works now for one thing (it flings around objects exactly like i want it), but doesnt work for more than 2.

          I even tried making arrays for every actor in the capsule and give them each their own variable spot in the array for start end and arc point. Still didnt work.

          With this: Click image for larger version

Name:	why it no work1.png
Views:	1
Size:	429.8 KB
ID:	1080061

          only the first one moves correctly, the second one just will be put to his endpoint and then nothing happens
          Last edited by t0b4cc0; 06-18-2015, 12:09 PM.

          Comment

          Working...
          X