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. Help and Support
  3. Projectile not showing up on layer

Projectile not showing up on layer

Scheduled Pinned Locked Moved Help and Support
22 Posts 3 Posters 464 Views 1 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.
  • MrAeon1111M Offline
    MrAeon1111M Offline
    MrAeon1111
    wrote last edited by MrAeon1111
    #12

    Did you publish a new version of the app?
    How did you fix it? Is it something in the behaviour that is visible so we can change the Z axis? Or we have to use a behaviour on that behaviour?

    1 Reply Last reply
    0
    • MrAeon1111M Offline
      MrAeon1111M Offline
      MrAeon1111
      wrote last edited by
      #13

      It would be nice that the bullets could have a tag just like an object.
      It’s very useful when you have a hit box inside a collision box.
      So you have a collision box for general collision and in the centre you have the real hit box

      1 Reply Last reply
      0
      • MrAeon1111M Offline
        MrAeon1111M Offline
        MrAeon1111
        wrote last edited by
        #14

        Or, do you have any work around?

        1 Reply Last reply
        0
        • RobinsonXR Offline
          RobinsonXR Offline
          RobinsonX
          wrote last edited by
          #15
          1. App hasn't been updated yet.
          2. The Z order property is editable in the shoot behavior itself.
          3. I'm guessing you mean to have bullets ignore collisions of some objects - not possible at the moment. Treating bullets like objects would bring a lot of performance overhead. It would be a lot better to use actual objects instead since you can define custom behavior logic for each bullet.
          1 Reply Last reply
          0
          • MrAeon1111M Offline
            MrAeon1111M Offline
            MrAeon1111
            wrote last edited by
            #16

            I cannot find the Z option in shoot…

            1 Reply Last reply
            0
            • MrAeon1111M Offline
              MrAeon1111M Offline
              MrAeon1111
              wrote last edited by
              #17

              And yes, it’s exactly what I meant about the bullet object… it would be nice to have a both system. even if it has performance issue… the performance issue we can judge by ourselves when we do something..
              Otherwise, it’s much too limited

              1 Reply Last reply
              0
              • MrAeon1111M Offline
                MrAeon1111M Offline
                MrAeon1111
                wrote last edited by MrAeon1111
                #18

                As I’m not an engineer in IT or mathematician.
                I would need a tutorial on how to shoot with a precise angle.
                Trying to become an engineer now, it will be too late for me.
                I would need a tutorial for that.

                When you just have to have a node that say shoot by an angle. making this by yourself with math formula, it’s mind blowing weird.
                Do you know somebody or something that can show me a complete and clean explanation how to do this?
                Thank you very much

                1 Reply Last reply
                0
                • RobinsonXR Offline
                  RobinsonXR Offline
                  RobinsonX
                  wrote last edited by
                  #19

                  The update has not released yet, so you won't see this z order setting yet.

                  I'll quickly whip up a demo project where you can shoot objects (instead of bullets) at whatever angle you please. You can customize the behavior of the objects if you like.

                  1 Reply Last reply
                  0
                  • RobinsonXR Offline
                    RobinsonXR Offline
                    RobinsonX
                    wrote last edited by
                    #20

                    Here is the project!
                    https://bit.ly/4x0FdQP

                    1 Reply Last reply
                    0
                    • RobinsonXR Offline
                      RobinsonXR Offline
                      RobinsonX
                      wrote last edited by RobinsonX
                      #21

                      IMG_9048.png
                      The shooting logic is located in the Joystick object. I'll briefly explain how it works.

                      1. Joystick Input triggers while using the joystick.
                      2. Debounce adds a cooldown so it doesn't shoot every frame. It limits how often its child behaviors are executed. In this case, it is set to 0.3s so you can only shoot one bullet every 0.3 seconds.
                      3. It spawns an object (the projectile), then it sets the spawned object's rotation to the angle from the Joystick Input.
                      4. We perform sine and cosine Math Functions on the angle to get the horizontal and vertical components respectively. These output a value between -1 and 1.
                      5. These components are multiplied because -1 and 1 is too small of a range. You'd probably want your projectiles to travel further than that.
                      6. Move By moves the spawned object by the multiplied values.

                      In conclusion, while holding the joystick, the player will shoot a bullet every 0.3 seconds angled at where the joystick is. Depending on the angle, the projectile moves in a particular direction.

                      In the spawned object, you can add whatever logic you want. In this case, I made the projectiles emit particles and destroy themselves when colliding with an object with the "Wall" tag.

                      1 Reply Last reply
                      0
                      • RobinsonXR Offline
                        RobinsonXR Offline
                        RobinsonX
                        wrote last edited by
                        #22

                        I think the hardest part here is getting the x and y values to move the object based on the angle. I guess we can add a shorthand way of doing that at some point.

                        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