Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Comments & Feedback
  3. Colliding

Colliding

Scheduled Pinned Locked Moved Comments & Feedback
52 Posts 5 Posters 20.9k Views 2 Watching
  • 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.
  • T Offline
    T Offline
    Thecheater887
    wrote on last edited by
    #1

    Add a behavior called “colliding”. Check if object A is colliding with object B. Returns true or false.

    This would be a LOT more efficient than looping through 750 objects every frame to check if any are less than a certain distance fro, and object.

    Aidan_FireA 1 Reply Last reply
    0
    • T Thecheater887

      Add a behavior called “colliding”. Check if object A is colliding with object B. Returns true or false.

      This would be a LOT more efficient than looping through 750 objects every frame to check if any are less than a certain distance fro, and object.

      Aidan_FireA Offline
      Aidan_FireA Offline
      Aidan_Fire
      wrote on last edited by Aidan_Fire
      #2

      @Thecheater887 There’s Collided (outputs once when an object starts colliding with another), there’s Stopped Colliding (outputs once when an object stops colliding with another) and there’s While Colliding (outputs every frame as long as the two objects are touching).

      Is While Colliding not what you need? Also since when does a behaviour output “true” or “false”? All behaviours, if they output anything, output a number.

      T 1 Reply Last reply
      0
      • Aidan_FireA Aidan_Fire

        @Thecheater887 There’s Collided (outputs once when an object starts colliding with another), there’s Stopped Colliding (outputs once when an object stops colliding with another) and there’s While Colliding (outputs every frame as long as the two objects are touching).

        Is While Colliding not what you need? Also since when does a behaviour output “true” or “false”? All behaviours, if they output anything, output a number.

        T Offline
        T Offline
        Thecheater887
        wrote on last edited by Thecheater887
        #3

        @Aidan-Oxley If you can solve this scenario using a version of that, then yes.

        I have an empty object. If it is colliding with a spawned object, it won’t spawn an object there.

        I have Collided changing Box Container to 1 if it is touching a spawned object.
        I also have Stopped Colliding changing box container to 0.

        Collided is never triggered.

        The empty object uses custom rotation and standard movement on a 0 duration.

        D Aidan_FireA 2 Replies Last reply
        0
        • T Thecheater887

          @Aidan-Oxley If you can solve this scenario using a version of that, then yes.

          I have an empty object. If it is colliding with a spawned object, it won’t spawn an object there.

          I have Collided changing Box Container to 1 if it is touching a spawned object.
          I also have Stopped Colliding changing box container to 0.

          Collided is never triggered.

          The empty object uses custom rotation and standard movement on a 0 duration.

          D Offline
          D Offline
          Deeeds
          wrote on last edited by
          #4

          @Thecheater887 Are you German?

          T 1 Reply Last reply
          1
          • T Thecheater887

            @Aidan-Oxley If you can solve this scenario using a version of that, then yes.

            I have an empty object. If it is colliding with a spawned object, it won’t spawn an object there.

            I have Collided changing Box Container to 1 if it is touching a spawned object.
            I also have Stopped Colliding changing box container to 0.

            Collided is never triggered.

            The empty object uses custom rotation and standard movement on a 0 duration.

            Aidan_FireA Offline
            Aidan_FireA Offline
            Aidan_Fire
            wrote on last edited by
            #5

            @Thecheater887 Is this empty object the spawner of the spawned object? “It won’t spawn an object there”, where? I might need more details about exactly what you want to happen.

            1 Reply Last reply
            0
            • D Deeeds

              @Thecheater887 Are you German?

              T Offline
              T Offline
              Thecheater887
              wrote on last edited by Thecheater887
              #6

              @Deeeds said in Colliding:

              @Thecheater887 Are you German?

              Haha, no lol. Fixed that one up. Sorry!

              @Aidan-Oxley said in Colliding:

              @Thecheater887 Is this empty object the spawner of the spawned object?

              ...Heh?

              “It won’t spawn an object there”, where? I might need more details about exactly what you want to happen.

              The empty object that spawns in the enemies and dynamic effects (well call it the replicator) rotates around, and follows the parent. Every frame, it rotates 14.6 degrees, and generates a random number between 0 and 50000. If the number is less than 10000, it spawn a special effect. If it’s less than 12500, it spawns a trashmob enemy, etc. In order to not stack 8 of something at once, I attempted to implement a system taking advantage of collisions to determine whether or not the Replicator was already “viewing” (on top of, colliding with) an object it had previously spawned. If the Replicator is “viewing” an object it had previously spawned, it won’t spawn another object on top of it, or shouldn’t, rather.

              If the Replicator is “viewing” an object it had previously spawned, it won’t spawn another object on top of it, or shouldn’t, rather.

              This is where my problem lies.

              I can’t get the “collided” event to trigger, signifying to the replicator it is not a clean area to spawn.

              D Aidan_FireA 2 Replies Last reply
              0
              • T Thecheater887

                @Deeeds said in Colliding:

                @Thecheater887 Are you German?

                Haha, no lol. Fixed that one up. Sorry!

                @Aidan-Oxley said in Colliding:

                @Thecheater887 Is this empty object the spawner of the spawned object?

                ...Heh?

                “It won’t spawn an object there”, where? I might need more details about exactly what you want to happen.

                The empty object that spawns in the enemies and dynamic effects (well call it the replicator) rotates around, and follows the parent. Every frame, it rotates 14.6 degrees, and generates a random number between 0 and 50000. If the number is less than 10000, it spawn a special effect. If it’s less than 12500, it spawns a trashmob enemy, etc. In order to not stack 8 of something at once, I attempted to implement a system taking advantage of collisions to determine whether or not the Replicator was already “viewing” (on top of, colliding with) an object it had previously spawned. If the Replicator is “viewing” an object it had previously spawned, it won’t spawn another object on top of it, or shouldn’t, rather.

                If the Replicator is “viewing” an object it had previously spawned, it won’t spawn another object on top of it, or shouldn’t, rather.

                This is where my problem lies.

                I can’t get the “collided” event to trigger, signifying to the replicator it is not a clean area to spawn.

                D Offline
                D Offline
                Deeeds
                wrote on last edited by
                #7

                @Thecheater887 This is EXACTLY the kind of problem that stems from not being able to store a reference in your replicator to the instance it has spawned.

                Instead, you have to use tags. Which means ALL objects with that tag will say they're colliding, if they are. So you won't be able to get the most recently spawned instance this way.

                You'll have to make other logic that does that, basically a manual filtering of all those with the given tag. Probably using a convoluted approach to attributes that know their order, or a sequence of live values in an array or some other approach that gets around the lack of referencing.

                It boggles my mind that nobody has bothered to write up at least one of the ways to get around referencing. Everyone knows it's an issue.

                iTap DevelopmentI Michael KhalfinG 2 Replies Last reply
                1
                • D Deeeds

                  @Thecheater887 This is EXACTLY the kind of problem that stems from not being able to store a reference in your replicator to the instance it has spawned.

                  Instead, you have to use tags. Which means ALL objects with that tag will say they're colliding, if they are. So you won't be able to get the most recently spawned instance this way.

                  You'll have to make other logic that does that, basically a manual filtering of all those with the given tag. Probably using a convoluted approach to attributes that know their order, or a sequence of live values in an array or some other approach that gets around the lack of referencing.

                  It boggles my mind that nobody has bothered to write up at least one of the ways to get around referencing. Everyone knows it's an issue.

                  iTap DevelopmentI Offline
                  iTap DevelopmentI Offline
                  iTap Development
                  wrote on last edited by
                  #8

                  @Deeeds you’ve been given multiple ways by multiple people, multiple times. But you always seem to just dismiss them for whatever reason.

                  D 1 Reply Last reply
                  0
                  • iTap DevelopmentI iTap Development

                    @Deeeds you’ve been given multiple ways by multiple people, multiple times. But you always seem to just dismiss them for whatever reason.

                    D Offline
                    D Offline
                    Deeeds
                    wrote on last edited by
                    #9

                    @iTap-Development What are you talking about?

                    iTap DevelopmentI 1 Reply Last reply
                    0
                    • D Deeeds

                      @iTap-Development What are you talking about?

                      iTap DevelopmentI Offline
                      iTap DevelopmentI Offline
                      iTap Development
                      wrote on last edited by
                      #10

                      @Deeeds “It boggles my mind that nobody has bothered to write up at least one of the ways to get around referencing. Everyone knows it's an issue.”

                      D 1 Reply Last reply
                      0
                      • iTap DevelopmentI iTap Development

                        @Deeeds “It boggles my mind that nobody has bothered to write up at least one of the ways to get around referencing. Everyone knows it's an issue.”

                        D Offline
                        D Offline
                        Deeeds
                        wrote on last edited by
                        #11

                        @iTap-Development Let me help you learn to use google:

                        0_1515011237498_Screen Shot 2018-01-04 at 4.26.50 AM.png

                        iTap DevelopmentI 2 Replies Last reply
                        0
                        • D Deeeds

                          @iTap-Development Let me help you learn to use google:

                          0_1515011237498_Screen Shot 2018-01-04 at 4.26.50 AM.png

                          iTap DevelopmentI Offline
                          iTap DevelopmentI Offline
                          iTap Development
                          wrote on last edited by
                          #12

                          @Deeeds you could probably have a full written account twice if you combine all mine and other’s posts.

                          D 1 Reply Last reply
                          0
                          • iTap DevelopmentI iTap Development

                            @Deeeds you could probably have a full written account twice if you combine all mine and other’s posts.

                            D Offline
                            D Offline
                            Deeeds
                            wrote on last edited by
                            #13

                            @iTap-Development I still don't understand your way of doing it. You never explained it.

                            "arrays... something... something ..."

                            iTap DevelopmentI 1 Reply Last reply
                            0
                            • D Deeeds

                              @iTap-Development Let me help you learn to use google:

                              0_1515011237498_Screen Shot 2018-01-04 at 4.26.50 AM.png

                              iTap DevelopmentI Offline
                              iTap DevelopmentI Offline
                              iTap Development
                              wrote on last edited by
                              #14

                              @Deeeds said in Colliding:

                              @iTap-Development Let me help you learn to use google:

                              0_1515011237498_Screen Shot 2018-01-04 at 4.26.50 AM.png

                              Except, you didn’t use “write-up” as a noun!

                              “bothered to write up at least one of the ways”

                              This is a verb phrase. The action of writing “one of the ways to get around referencing”.
                              To put into writing.

                              Here’s your sentence modified to fit your definition:
                              “It boggles my mind that nobody has bothered to DO A write-up OF at least one of the ways to get around referencing. Everyone knows it's an issue.”

                              just saying😉

                              1 Reply Last reply
                              0
                              • D Deeeds

                                @iTap-Development I still don't understand your way of doing it. You never explained it.

                                "arrays... something... something ..."

                                iTap DevelopmentI Offline
                                iTap DevelopmentI Offline
                                iTap Development
                                wrote on last edited by
                                #15

                                @Deeeds said in Colliding:

                                @iTap-Development I still don't understand your way of doing it. You never explained it.

                                "arrays... something... something ..."

                                Go re-read😄

                                D 1 Reply Last reply
                                0
                                • T Thecheater887

                                  @Deeeds said in Colliding:

                                  @Thecheater887 Are you German?

                                  Haha, no lol. Fixed that one up. Sorry!

                                  @Aidan-Oxley said in Colliding:

                                  @Thecheater887 Is this empty object the spawner of the spawned object?

                                  ...Heh?

                                  “It won’t spawn an object there”, where? I might need more details about exactly what you want to happen.

                                  The empty object that spawns in the enemies and dynamic effects (well call it the replicator) rotates around, and follows the parent. Every frame, it rotates 14.6 degrees, and generates a random number between 0 and 50000. If the number is less than 10000, it spawn a special effect. If it’s less than 12500, it spawns a trashmob enemy, etc. In order to not stack 8 of something at once, I attempted to implement a system taking advantage of collisions to determine whether or not the Replicator was already “viewing” (on top of, colliding with) an object it had previously spawned. If the Replicator is “viewing” an object it had previously spawned, it won’t spawn another object on top of it, or shouldn’t, rather.

                                  If the Replicator is “viewing” an object it had previously spawned, it won’t spawn another object on top of it, or shouldn’t, rather.

                                  This is where my problem lies.

                                  I can’t get the “collided” event to trigger, signifying to the replicator it is not a clean area to spawn.

                                  Aidan_FireA Offline
                                  Aidan_FireA Offline
                                  Aidan_Fire
                                  wrote on last edited by
                                  #16

                                  @Thecheater887 So you don’t want the replicator to spawn a new object while I spawned object isn’t already on top of it. And you can’t disable spawning for a few seconds, or however many seconds it might take for the spawned object to go away, after spawning an object?

                                  T 1 Reply Last reply
                                  0
                                  • Aidan_FireA Aidan_Fire

                                    @Thecheater887 So you don’t want the replicator to spawn a new object while I spawned object isn’t already on top of it. And you can’t disable spawning for a few seconds, or however many seconds it might take for the spawned object to go away, after spawning an object?

                                    T Offline
                                    T Offline
                                    Thecheater887
                                    wrote on last edited by Thecheater887
                                    #17

                                    @Aidan-Oxley Spawned objects can only be destroyed by the player or by exiting the play area.

                                    The player can move in 8 directions.

                                    Aidan_FireA 1 Reply Last reply
                                    0
                                    • T Thecheater887

                                      @Aidan-Oxley Spawned objects can only be destroyed by the player or by exiting the play area.

                                      The player can move in 8 directions.

                                      Aidan_FireA Offline
                                      Aidan_FireA Offline
                                      Aidan_Fire
                                      wrote on last edited by
                                      #18

                                      @Thecheater887 Hmm, the time it takes for spawned objects to leave is quite random. Are you sure none of your objects are scenery, if the collision just won’t activate? I would’ve expected that the object constantly rotating might even spam the collision behaviour.

                                      T 1 Reply Last reply
                                      0
                                      • Aidan_FireA Aidan_Fire

                                        @Thecheater887 Hmm, the time it takes for spawned objects to leave is quite random. Are you sure none of your objects are scenery, if the collision just won’t activate? I would’ve expected that the object constantly rotating might even spam the collision behaviour.

                                        T Offline
                                        T Offline
                                        Thecheater887
                                        wrote on last edited by
                                        #19

                                        @Aidan-Oxley All passive walls.

                                        Aidan_FireA 1 Reply Last reply
                                        0
                                        • T Thecheater887

                                          @Aidan-Oxley All passive walls.

                                          Aidan_FireA Offline
                                          Aidan_FireA Offline
                                          Aidan_Fire
                                          wrote on last edited by Aidan_Fire
                                          #20

                                          @Thecheater887 I’ve got no idea why the collided behaviour isn’t triggering. You could try reversing how you’re doing this, rather than detecting whether there’s an object and if there is don’t spawn another, have the spawned object tell then replicator when it has left? (If the player destroys it, tell the replicator the second it has died, if it has left the area, also tell the replicator etc). So the replicator will automatically turn off its own spawning after spawning an object, and it has to wait until a spawned object turns its spawning back on.

                                          T 1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Search