Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    Hitboxes

    Help
    2d-blocks help
    4
    13
    670
    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.
    • GreeniWasTakenYT
      GreeniWasTakenYT last edited by jeffreyrb03-gmail

      CreatiCode team, can you edit the convex hull hitboxes to be more accurate? thx!2024_10_04_0em_Kleki.png

      when life give you toasters, make toasterade… something like that

      info-creaticode 1 Reply Last reply Reply Quote 1
      • info-creaticode
        CreatiCode @GreeniWasTakenYT last edited by info-creaticode

        @s9205307-810c679a

        By definition, a “convex hull” is a “convex” shape, which means it is a single shape with no holes inside it and no indents on its edge.

        What you draw is a hole inside a shape, so it can not be supported.

        The reason for that is it is much faster to test if 2 shapes are colliding (overlapping) if both of them are convex. If we allow holes inside them, then the computation will be much more complex and time-consuming.

        Can you explain what you are trying to do a bit more? Maybe you can consider using 2 or 4 convex shapes instead?

        c. GreeniWasTakenYT 2 Replies Last reply Reply Quote 1
        • c.
          Cαƚƚყ Mod Helper @info-creaticode last edited by

          @info-creaticode
          Yes.
          @s9205307-810c679a
          You can make 2 hitboxes, one for collision, and one for colliding with objects that kill you.

          Official Forums Moderator

          jeffreyrb03-gmail 1 Reply Last reply Reply Quote 0
          • jeffreyrb03-gmail
            JaecadeJnight Mod Helper @c. last edited by

            @catty is this even a weapon? why would it kill you? or is that just like in general

            #LLJW
            <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

            c. 1 Reply Last reply Reply Quote 0
            • c.
              Cαƚƚყ Mod Helper @jeffreyrb03-gmail last edited by

              @jeffreyrb03-gmail Like Geometry Dash Spikes.

              Official Forums Moderator

              jeffreyrb03-gmail 1 Reply Last reply Reply Quote 0
              • jeffreyrb03-gmail
                JaecadeJnight Mod Helper @c. last edited by

                @catty makes sense

                #LLJW
                <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                1 Reply Last reply Reply Quote 0
                • GreeniWasTakenYT
                  GreeniWasTakenYT @info-creaticode last edited by GreeniWasTakenYT

                  @info-creaticode Good suggestion! Can you teach me how to dot that please? thx

                  when life give you toasters, make toasterade… something like that

                  info-creaticode 1 Reply Last reply Reply Quote 0
                  • info-creaticode
                    CreatiCode @GreeniWasTakenYT last edited by

                    @s9205307-810c679a

                    Can you explain what you are trying to use this for?

                    GreeniWasTakenYT 1 Reply Last reply Reply Quote 0
                    • GreeniWasTakenYT
                      GreeniWasTakenYT @info-creaticode last edited by

                      @info-creaticode I’m trying to use this to remake the game “Bad Piggies.” In the game, you can put the pig in a box with a hole! . I am trying to replicate that. Look at the image.2024_10_04_0x2_Kleki.png

                      when life give you toasters, make toasterade… something like that

                      info-creaticode jeffreyrb03-gmail 2 Replies Last reply Reply Quote 1
                      • info-creaticode
                        CreatiCode @GreeniWasTakenYT last edited by

                        @s9205307-810c679a

                        That’s an interesting game. It seems a box would be fine for the hitbox. Why do you need it to be a red frame like you have drawn here?

                        1 Reply Last reply Reply Quote 1
                        • jeffreyrb03-gmail
                          JaecadeJnight Mod Helper @GreeniWasTakenYT last edited by

                          @s9205307-810c679a if you really wanna have a box in a box hitbox then why not use 4 box hitboxes: 7bab6bec-d784-478a-ab54-62fa0ca25cc9-image.jpeg

                          #LLJW
                          <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                          info-creaticode 1 Reply Last reply Reply Quote 0
                          • info-creaticode
                            CreatiCode @jeffreyrb03-gmail last edited by info-creaticode

                            @jeffreyrb03-gmail

                            That’s also a good option, if the hit box must have an empty square hole inside it.

                            Here is an example of how to do it using “compound shape”. You just need to draw the costume using 4 boxes:

                            https://play.creaticode.com/projects/670083d55689190abfe5461f

                            jeffreyrb03-gmail 1 Reply Last reply Reply Quote 2
                            • jeffreyrb03-gmail
                              JaecadeJnight Mod Helper @info-creaticode last edited by jeffreyrb03-gmail

                              @info-creaticode Ahhh yes, thats pretty good

                              #LLJW
                              <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

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