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

    Move player forward In their direction

    Scheduled Pinned Locked Moved Unsolved Help and Support
    4 Posts 3 Posters 55 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.
    • IAmPotatI Offline
      IAmPotat
      last edited by

      How would I move an object forwards or backwards of the direction its facing. Example: A cube is facing the right so want to move to the right. This mostly only affects top down games.

      1 Reply Last reply Reply Quote 0
      • MurtazaM Offline
        Murtaza Admin
        last edited by

        The built in Joystick controlled behaviour should handle this automatically. Make sure the "should flip" toggle is on.

        1 Reply Last reply Reply Quote 1
        • IAmPotatI Offline
          IAmPotat
          last edited by

          Im trying to make a raycasting system, and i need to move a projectile out of a wall from where it came frim

          RobinsonXR 1 Reply Last reply Reply Quote 0
          • RobinsonXR Offline
            RobinsonX @IAmPotat
            last edited by

            @IAmPotat The Raycast Test behavior outputs a normal field. This is the angle that the ray would travel if it were to reflect. You can use this to rotate an object to that angle, and then use a Calculate Direction behavior to calculate the x_vector and y_vector from the center of the object to where it's facing. You can use those values to determine how much your object moves when a ray has intersected with an object.

            If you need help on how to use the behavior, this video has step-by-step examples:

            1 Reply Last reply Reply Quote 2
            • IAmPotatI IAmPotat marked this topic as a question
            • First post
              Last post