Saltar al contenido principal

Búsqueda

Get the position of a scene element

  • davidnorth100

    Tags have a scene space transform output which you can split to get position. Regarding getting the nearest tag, the detected output of a trigger zone can vary in strength if falloff is used based on proximity so that should help.

  • davidnorth100

    Sorry I realised that my comment doesn't help much since you won't know which tag of a type you've detected so can't get its transform.

  • Super-Ogge

    Thanks still @davidnorth100 !

  • StankyDino

    Cool, So I've done this before.

    On your targets that you want to select, have a tag called Enemy Transform. You can adjust the position of where the tag's position is when you select it and it gives you the little xyz gizmo in worldspace, if you want all tags center-of-mass.

    Set a Sphere Zone Trigger on your player with a falloff radius of whatever you want the range to be, and set it to detect Enemy Transform. For each of the potential targets in range, this will activate that tag, but the falloff will determine how strong the signal from each of the tags is.

    Back on the Enemy, Wire Enemy Transform's output into an Exclusive gate named Nearest Filter. Set it to be able to interrupt (the little lightning bolt icon in Tweak menu).
    What this does is that it only allows one gate at a time to be open, and that gate will be the one with the strongest signal, (closest to you).

    Then, wire the output of the Gate into a tag called My Nearest Target.
    Now you can search for the position of THIS tag, and there will only be one of them active in the scene.

  • Super-Ogge

    '@StankyDino
    Thank you so much! I’ll try it as soon as I can! :)

  • davidnorth100

    Oh that's great I didn't know the tags for powered like that !

  • Super-Ogge

    I phrased the question incorrectly, instead of tags, I meant labels. Is this at all possible?

Iniciar sesión para dejar un comentario.