hyperPad hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Kick action with physic

    Scheduled Pinned Locked Moved Help and Support
    2 Posts 2 Posters 19 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.
    • MrAeon1111M Offline
      MrAeon1111
      last edited by

      Hello,
      I just started a project and I would like to know if you can help me.

      I would like to be able to kick an object.
      Can you show me how to do that?
      I have just no clue what to use.

      Just a 2-D character walking down and kicking object with physics.

      Thank you very much

      KrystalYeeK 1 Reply Last reply Reply Quote 0
      • KrystalYeeK Offline
        KrystalYee Admin @MrAeon1111
        last edited by

        @MrAeon1111 said in Kick action with physic:

        Hello,
        I just started a project and I would like to know if you can help me.

        I would like to be able to kick an object.
        Can you show me how to do that?
        I have just no clue what to use.

        Just a 2-D character walking down and kicking object with physics.

        Thank you very much

        Yes, you can do this in hyperPad. The idea is simple: make both the player and the object use physics, then apply a force to the object when the kick happens.

        1. Make the objects use physics

        Select the object you want to kick.

        Add the behavior Make Physics.

        Do the same for the player character if you want realistic interaction.
        When an object is a physics object it reacts to gravity, collisions, and forces in the scene.

        Physics objects can collide with other physics or wall objects, which is what lets things be pushed or kicked.

        2. Detect when the kick hits the object

        Add the behavior Collision Event to the player.

        Settings:

        • Object A: Player

        • Object B: The object you want to kick

        • Event type: Started Colliding

        This behavior triggers when two objects start touching.

        3. Apply force to simulate the kick

        After the Collision Event, add:

        Apply Force or Propel Object (from the Physics behaviors).

        Set:

        • Object: the object being kicked

        • Direction: left/right based on your character direction

        • Strength: adjust until it feels right

        The hyperPad physics engine will handle the movement and collisions automatically.

        4. Optional improvements

        You can tweak physics properties to change how the kick feels:

        • Mass (heavier objects move less)

        • Friction

        • Bounce

        These can be changed with Set Physics Property.

        Let me know if this helps! You can learn all about this on the hyperPad documentation: https://documentation.hyperpad.com/hc/en-us

        1 Reply Last reply Reply Quote 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
        • First post
          Last post