Announcement

Collapse
No announcement yet.

I moved that direction, I stopped, keep looking that way?

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

  • I moved that direction, I stopped, keep looking that way?

    So I've been trying to get the player model to look in the direction I'm moving and not the direction I'm looking. So far it works (though kinda ugly), but I cannot figure out how to get the player to "stay" looking in the same direction once I've stopped.

    I put this into playermovement.qc at the end.........yes using DarkPlaces.

    // //begin exact nsew
    if (self.velocity_y <= -45)
    self.angles = self.v_angle = '0 -90 0';//n
    else if (self.velocity_y >= 45)
    self.angles = self.v_angle = '0 90 0';//s

    if (self.velocity_x <= -45)
    self.angles = self.v_angle = '0 -180 0';
    else if (self.velocity_x >= 45)
    self.angles = self.v_angle = '0 0 0';
    //end exact udlr

    //begin exact diagnals
    if ((self.velocity_x <= -45 )&&(self.velocity_y <= -45))
    self.angles = self.v_angle = '0 -135 0';
    else if ((self.velocity_x >= 45)&&(self.velocity_y <= -45))
    self.angles = self.v_angle = '0 -45 0';

    if ((self.velocity_x <= -45)&&(self.velocity_y >= 45))
    self.angles = self.v_angle = '0 135 0';
    else if ((self.velocity_x >= 45)&&(self.velocity_y >= 45))
    self.angles = self.v_angle = '0 45 0';
    }

    While running, the player shoots in the same direction. When the player stops you start shooting/looking where the mouse is.

    I know some of the problem is:
    using velocity, and not some arsome math equation that balances angle from mouse angle. (or something simpler)
    I know it has to do with playerpostthink, since I have no call. (what would the call be?)

    I have tried 2DCAM, but I am too many.qc fies deep into other modifications, and would be lost without the original qc code.

    any ideas?

  • #2
    Are we re-inventing the mouse use in Quake1? Holy cow bro
    Want to get into playing Quake again? Click here for the Multiplayer-Startup kit! laissez bon temps rouler!

    Comment


    • #3
      sounds like a quite interesting idea. i would however like it more if it was without the keep shooting straight while walking. but it would be great if the player model wouldnt rotate when you looked around while standing still, and would only start moving again when you walked or fired

      that would be awesome, if the player model would keep standing still while you didnt move, it looks rather funny when the player model rotates, especially when it tilts backward when you aim up
      .
      are you curious about what all there is out there in terms of HD content for quake?
      > then make sure to check out my 'definitive' HD replacement content thread! <
      everything that is out there for quake and both mission-packs, compiled into one massive thread

      Comment


      • #4
        .vector lookdir;
        in PlayerPostThink:
        {
        if (length(self.velocity) > 64)
        {
        self.lookdir = vectoangles(self.velocity);
        }
        if (self.fixangles)
        {
        self.angles = self.lookdir;
        self.angles_x = self.angles_x * 0.333;
        }
        }

        should do it without the limited graduations+extensions. but it won't work in mirrors because the client will always override any values you set, and there's no solution to that other than csqc.
        Some Game Thing

        Comment


        • #5
          client.qc(124: error: Unknown value "length"

          ../progs.dat - 1 error(s), 0 warning(s)

          ggrrrrrr.....todays dumb question: why?

          Comment


          • #6
            When you aim a large weapon with your arms (into the air, to the left, right, or down) your torso will shift and arc. I think ID had it right to spend time getting that to work, as opposed to just having the model do nothing..

            Why are you doing this?

            Comment


            • #7
              vlen, not length, sorry.
              Some Game Thing

              Comment


              • #8
                Originally posted by circleko View Post
                So I've been trying to get the player model to look in the direction I'm moving and not the direction I'm looking.
                I don't like this idea...

                so you'll be running forward but if you shoot someone who's behind you you will shoot a rocket out of your ass?
                QuakeOne.com
                Quake One Resurrection

                QuakeOne.com/qrack
                Great Quake engine

                Qrack 1.60.1 Ubuntu Guide
                Get Qrack 1.60.1 running in Ubuntu!

                Comment


                • #9
                  that wouldnt give you any backpedal at all?
                  Want to get into playing Quake again? Click here for the Multiplayer-Startup kit! laissez bon temps rouler!

                  Comment

                  Working...
                  X