Announcement

Collapse
No announcement yet.

Shoot only through the X Axis

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Shoot only through the X Axis

    I am building a Side Scroller and I am working shooting currently. Right now where ever you click the projectile will be shot to that point in space. Meaning the if you shoot to the left but click on the back wall than the projectile will go towards the wall. How can I make it so the projectile will only travel on the X axis so it is on the path with the character.
    Attached Files

    #2
    Use a Make Vector node. Then hook up the XYZ inputs using the Y location of your character and the X and Z location of the Break Hit Result > Location vector. Then hook up the created vector to the "To" input of the Get Vector Direction node.
    Last edited by drb1992; 08-12-2015, 01:26 PM.
    Logitech Wheel Plugin

    Comment


      #3
      When I try to hook up anything it says that it is not compatible because the Make Vector node has floats of x, y, and z while the Location gives off a vector. Amy way of fixing this?

      Comment


        #4
        use a Break Vector node
        Logitech Wheel Plugin

        Comment


          #5
          Thanks so much, its working now!

          Comment

          Working...
          X