+ Reply to Thread
Results 1 to 6 of 6

Thread: Expression Gate typo for self-aware angular velocity

  1. #1
    Wirererer Ergzay's Avatar
    Join Date
    Jun 2007
    Posts
    232

    Default Expression Gate typo for self-aware angular velocity

    The functions in the expression gate for self-aware angular velocities are wrong. extangp() returns roll velocity, extangr() returns yaw velocity, extangy() returns pitch velocity. It is a typo in the code by someone who looks like they were in a hurry. Here is the code:

    Code:
    ENT._extangvelp_0 =   function (self) return self:GetPhysicsObject():GetAngleVelocity().x end
    ENT._extangvely_0 =   function (self) return self:GetPhysicsObject():GetAngleVelocity().y end
    ENT._extangvelr_0 =   function (self) return self:GetPhysicsObject():GetAngleVelocity().z end
    The typo is that pitch should be y, roll should be y, and yaw should be z. Corrected version:

    Code:
    ENT._extangvelr_0 =   function (self) return self:GetPhysicsObject():GetAngleVelocity().x end
    ENT._extangvelp_0 =   function (self) return self:GetPhysicsObject():GetAngleVelocity().y end
    ENT._extangvely_0 =   function (self) return self:GetPhysicsObject():GetAngleVelocity().z end

  2. #2
    Wirererer zeroZshadow's Avatar
    Join Date
    May 2008
    Location
    Holland
    Posts
    118

    Default

    the reason he probeably made the mistake is because Y is usualy UP (Yaw) and Z is forward (roll)

  3. #3
    Wire Sofaking ShaRose's Avatar
    Join Date
    Mar 2007
    Location
    Burin, Newfoundland, Canada
    Posts
    542

    Default

    Actually, you can use angle.p, angle.y, and angle.r as well if you want to make it easier.

  4. #4
    Wirererer Ergzay's Avatar
    Join Date
    Jun 2007
    Posts
    232

    Default

    ZeroZshadow actually no, you are quite wrong there. Z is usually up, Y is usually forward, and X is usually to the right.

  5. #5
    Wirererer Tuollaf's Avatar
    Join Date
    May 2008
    Posts
    215

    Default

    Just outs interest what dose this code do?

  6. #6
    Wire Amateur metz10's Avatar
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    68

    Default

    It's like a gyroscope - read the documentation.

+ Reply to Thread

Similar Threads

  1. Speedo Angular Velocity Conversions?
    By -=Fox=- in forum Wiremod General Chat
    Replies: 1
    Last Post: 07-27-2008, 10:56 PM
  2. Angular Velocity Gyroscope
    By ZeroPoint in forum Wiremod Addons & Coding
    Replies: 24
    Last Post: 03-17-2008, 03:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots