FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    The current pre-release of the client ("pioneer" in the version) is only compatible to itself. So you can only play with other testers. Please be aware!

    I'm old and don't remember...

    Scheduled Pinned Locked Moved Modding & Tools
    6 Posts 3 Posters 469 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      Resin_Smoker
      last edited by

      How can I get the world height of an object / bone above the surface terrain?

      Note: Planning on using this to cause objects to fall during its death event. Only other option would be to use projectiles that use the objects model / textures. However, this is an even bigger can of worms as I'd need to use only one of the bones to achieve the effect. Not the entire model. (Don't recall how I did this 10 years ago either)

      Kykhu Oss https://youtu.be/JUgyGTgeZb8
      Unit Thrower https://youtu.be/iV8YBXVxxeI
      Beam Tentacle https://youtu.be/le5SNwHvC4c
      Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
      Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

      1 Reply Last reply Reply Quote 0
      • SaverS Offline
        Saver
        last edited by

        Isn't that specified in the animation? For the units, I at least do something like that in Blender.

        auch mal fünf gerade sein lassen

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          Resin_Smoker @Saver
          last edited by

          @saver sorry but no. What I'm referring to is the entity in the game world, where a bones position will change due to motion and changes in terrain. Being able to get the height of any bone relative to the ground , enables the use of sliders. Which can be used to create custom death events that don't require a dedicated animation event.

          Kykhu Oss https://youtu.be/JUgyGTgeZb8
          Unit Thrower https://youtu.be/iV8YBXVxxeI
          Beam Tentacle https://youtu.be/le5SNwHvC4c
          Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
          Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

          1 Reply Last reply Reply Quote 1
          • speed2S Offline
            speed2
            last edited by

            https://github.com/FAForever/fa/blob/develop/engine/Sim/Entity.lua#L241-L246
            https://github.com/FAForever/fa/blob/develop/engine/Sim.lua#L635-L641

            R 1 Reply Last reply Reply Quote 1
            • R Offline
              Resin_Smoker @speed2
              last edited by

              @speed2

              Lol.. Dam, now I feel stupid as I should have remembered that GetPostion could be used this way. You know sometimes, we can't see the forest for the trees. That, and it probably didn't help much that last time I coded, I used to drink a fair bit when scripting. Oh coarse, now that I don't drink (health reasons), its no surprise thst I'm failing to recall some things.

              Kykhu Oss https://youtu.be/JUgyGTgeZb8
              Unit Thrower https://youtu.be/iV8YBXVxxeI
              Beam Tentacle https://youtu.be/le5SNwHvC4c
              Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
              Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

              1 Reply Last reply Reply Quote 1
              • R Offline
                Resin_Smoker
                last edited by Resin_Smoker

                @speed2 was able to use GetPosition(bone) today in an attempt to add sliders to a death event. While the sliders do work end end locations were unexpected for the information provided.

                Do you know if slider (CreateSlider) moving a bone, also moves the child bones (i think it does) , and does the bone orientation matter at all?

                Edit: Was able to confirm that the sliders do affect child bones. Which makes using a slider on a complex system of bones not particularly viable.

                Kykhu Oss https://youtu.be/JUgyGTgeZb8
                Unit Thrower https://youtu.be/iV8YBXVxxeI
                Beam Tentacle https://youtu.be/le5SNwHvC4c
                Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
                Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post