Przejdź do głównej zawartości

Szukaj

How do I move an object to a calculated X,Y,Z point in empty space and move on to other calculated locations?

  • kemengjie33

    You could just emit the sphere at the coordinates. Or if you want it to move from place to place emit a tag at your coordinates. Then use a follower, once the sphere reaches the tag, emit the next one. There is a transform input on the last tab menu of the emitter. This is where you send your x,y,z.

  • KlawUK

    Teleporter? I don’t know if you can send the position info to it, you might need an object already at the location with a tag to teleport to (set to invisible and not collidable)

  • GBO-Possum

    I will try the idea of emitting AT the coordinates. The Glossary tells me “The position of the gizmo defines where to emit from” rather than having the ability to emit to a location, so I didn’t go down that path.

    Teleporter seems to need a Tag for every destination and since I’ll have potentially thousands of them, that won’t be a good solution for my particular application.

    I’m trying to algorithmicly build a 3D structure which can vary from play to play

  • CloaknDaggerson

    I think you might have to build some kind of x,y,z plotter? I might be clutching at the finest of straws but I shall try and put down my thoughts.

    Have one object as your datum/origin point, lets call it 'home'
    Calculate your x,y,z making sure to take into account your 'home' coordinates. (no idea how you are calculating your required x,y,z values but..) split this or directly send each value through three separate signal transmitters, one for each, (I'm half guessing this is possible).
    Emit a 'pre-programmed' sphere as your plotter.

    The sphere or 'plotter' needs to have three separate signal receivers,again one for each axis and also a TAG outputing it's own transform data (again split to isolate each of it's own x,y and z values?

    Use an advanced mover to 'programme' the sphere to move along each axis in turn, first on the 'x' axis until it's own 'x' axis value matches that of the 'x' value transmitted from home (obviously use a calculator gadget as a comparator), and then the same for the 'y' axis and then 'z'...of course when the 'z' values are matched you know you that the plotter has reached the first coordinate ready to spit out a cube!

    Set the 'plotter' up to self destruct at this point ready for your 'home' object to emit another.

    Rinse and repeat.

    Having said all that I realize that you might only need one transmitter and one receiver (you might be able to use selectors to send/receive each signal in turn).

    I realise this might be too slow a 'plot' but not sure of an easier or quicker solution unless you set up an array of sorts, or possibly set up your spheres so that once emitted they collect and store their target coordinate for comparison without needing to receive them from 'home', then you could theoretically fire off spheres one after the other without having to wait for each one to reach it's target.

    Good grief, sorry, I hope some of this makes sense.








  • GBO-Possum

    '@CloaknDaggerson, my head may explode but I’ll try this tomorrow. Thank you for your yeoman’s effort! Much appreciated

  • kemengjie33

    Actually, you only need the one tag, you use an emitter to send the tag to the different locations. How you want to input your coordinates can vary.
    Since you seem to know the numbers for the locations, you could attach three variable sliders (x, y, z) to a combiner (set for transform) and have the output from that combiner go into the Transform input on the emitter.
    I've played around with this, you can pretty much emit an object anywhere in the level by just moving the sliders and changing the coordinates (feels like old school Star Trek). Then use keyframes to "lock" the sliders' positions for each of your locations.

  • amchornet76

    Actually, actually, actually, you don't need to do any of that. A follower has an input for XYZ position directly :) it's on the third page. Just make sure to set the max and min of the tag finder on the second page to 0.1 otherwise if it sees a tag it will go that instead.

    As for emitting when it's arrived at the coordinates that's a little tricky, there's no way that I've found to get the direct XYZ coordinates of an object so you have to use a tag on that object with the tag gizmo at the center of mass (you can see this if you plop a rotator down on it the Centerpoint of all three axes) then you take the tags transform output (in its tweak menu) split it, subtract that from the target position and then if it's zero (or close enough like less than 0.5) you emit the square.

  • GBO-Possum

    '@amchornet76,

    When you say "... subtract that from the target position and then if it's zero (or close enough like less than 0.5) you emit the square..."...

    ...is that because you want to wait for the object which will do the Emitting to arrive at XYZ?

    This is bothering me a little since I may have thousands of things to Emit and I want this to happen quickly. I guess I was hoping there'd be a way of getting to the XYZ in zero time like a Teleport

  • kemengjie33

    @amchornet76 "A follower has an input for XYZ position directly :) it's on the third page"
    Oh that's interesting. So basically you could make a game where the player inputs coordinates (with a slider or what have you) into a ship and then hits a button "Go" and the follower will fly the ship to the coordinates? That sounds kinda cool.

  • amchornet76

    '@gbo
    You can set the thing to go at 1000ms I think with followers (or maybe 9999ms I think the limit is based on its size) so it would all happen almost instantly.
    Teleporters unfortunately don't take in a transform to teleport (they should and I think I asked for that in the feedback section) but this should work for your purposes.

    @keme
    Yep exactly. It's really useful I use it for my splitscreen that I am working on.

Zaloguj się, aby dodać komentarz.