Allow setting of vector components individually?

Forums 💬 NodeCanvas 🗨️ General Discussion Allow setting of vector components individually?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #15040
    grofit
    Participant

      I am just wondering if there is a way for you to allow people to set the vector, or just set their components individually.

      Take the scenario where an input axis changes, you will have a float measuring the change that is applicable to X,Y or Z. So it would be good to just assign that float into one of the vectors components wherever a Vector is expected.

      Not sure how easy it is or how often this usecase would be useful, for the moment I am going to see if there is an existing CreateVector action or make one for this instance.

      #15043
      grofit
      Participant

        Ah found ComposeVector which does what I want.

        #15042
        Gavalakis
        Keymaster

          Hello!

          I was thinking of adding 3 BBFloats inside the BBVector type so that this is possible and allow a selection of either a whole vector or it individual components either directly or from a blackboard variable, but i was thinking that this might be an overkill.
          So indeed, right now the way to go about it is ComposeVector and DocomposeVector that you found out 🙂

          Though, i still investigate if the above idea could be possible

          #15041
          grofit
          Participant

            Given that most *real* use cases will be working at a much higher level (i.e behavioural level not functional level) its probably not a major worry, was just something I noticed in my specific use case (getting an axis change and apply it to a movement), this is just as part of an example scene for some custom actions though so its not like in the real world I would lose any sleep over it.

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.