Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Coding for Fun: Measuring Models and Making Advanced Collision Responses

    Functions
    dimensions collision measure response
    4
    11
    937
    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.
    • PickleCatStars
      PickleCatStars F last edited by

      Wow, this is quite a lot to take in! I’ve had a similar thing on my to do list for quite some time, and it looks like you’ve done all I was hoping to do and more! I won’t be able to drag-and-drop this but I’ll be studying it for sure.

      Is there any advantage to using sprites as the base rather than a struct?

      1 Reply Last reply Reply Quote 1
      • Chronos
        Chronos last edited by

        I had memory leaks the first time I implemented something else with structs (it was when I did sprite splicing to add to the possible animations). I don't know if this was the problem exactly, but I think that structs were copied into each function instead of being passed by reference (without being deleted). FUZE4 silently crashed without an error (which isn't something it does if I load too many models), so it is a bit of conjecture on my part.

        Regardless, structs are limited to their preset attributes. I may try to extend it to allow optional spherical boundaries, which will add attributes that aren't always present (i.e., radius).

        Let me know if you have any questions, and thanks for your interest.
        Jason

        1 Reply Last reply Reply Quote 1
        • PickleCatStars
          PickleCatStars F last edited by

          Do you know about the ref keyword?

          1 Reply Last reply Reply Quote 0
          • Chronos
            Chronos last edited by

            I definitely tried to use it for the sprite-splicing related project, but since that was a while ago (and I reimplemented it with sprites too), I can't just post it as an example case. I'll try to make a short program that makes it crash that way with structs later.

            1 Reply Last reply Reply Quote 0
            • PickleCatStars
              PickleCatStars F last edited by

              I figured you’d already know about it. I just thought I’d mention it just in case.

              I’m excited to have a look at all of this here, especially curious about the rotational velocity stuff, which I had decided was ‘maybe sometime down the road, but not now’.

              I will definitely write back here if I have any questions. In the meantime, thanks again! :)

              1 Reply Last reply Reply Quote 0
              • Chronos
                Chronos last edited by

                Huh, I had all of the struct code for the sprites conveniently commented out because of the problem I'd had, but when I reintroduced them (and waited for a crash) nothing bad happened. Maybe I didn't wait long enough, or maybe there was a patch?

                At any rate, I rescind my comment about the struct crash, for now xD.

                Sprite splicing:
                With structs N1WGDMNDN5
                Without structs NSYMENNDN5

                pianofire 1 Reply Last reply Reply Quote 2
                • pianofire
                  pianofire Fuze Team @Chronos last edited by

                  @Chronos You have shared these programs but they are currently only visible to your Switch Friends. If you want them to be downloadable by code they have to be submitted for approval.Take a look here: https://fuzearena.com/forum/topic/725/new-community-sharing-on-fuze4.

                  1 Reply Last reply Reply Quote 1
                  • Chronos
                    Chronos last edited by

                    Done! Thanks for the tip.

                    1 Reply Last reply Reply Quote 1
                    • PickleCatStars
                      PickleCatStars F last edited by

                      Hiya! Just got around to downloading this, and I can tell straight away that it’s going to make my kids happy. They’re always shocked and offended when in my game, the player character can just walk straight through buildings as if they’re not there. Looking forward to having a good dive into this, thanks again :)

                      1 Reply Last reply Reply Quote 1
                      • joyrider3774
                        joyrider3774 last edited by

                        thanks soo much for this i use it to know objects dimensions for my projects well i use it to find the values i need, i don't use the code in my project

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