Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124

    [help] ghostmode math

    yes im looking for the math that 1-key ghostmode uses. i have a function for it set up like this:
    Code:
    void forward( float distance, float yaw, float pitch, int max_yaw, int max_pitch )
    its going to be for any fps, thats why i have the int max_yaw and max_pitch. thanks in advance!

  2. #2
    IcySeal's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    300
    Reputation
    34
    Thanks
    148
    My Mood
    Amused
    sin cos
    there you go

  3. #3
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    i have a feeling this requires a lot of thinking...

  4. #4
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,014
    Reputation
    58
    Thanks
    224
    Quote Originally Posted by kibbles18 View Post
    i have a feeling this requires a lot of thinking...
    learn math?

  5. #5
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    wehr d0 i dl mat h?

  6. #6
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,014
    Reputation
    58
    Thanks
    224
    Quote Originally Posted by kibbles18 View Post
    wehr d0 i dl mat h?
    ummm what

  7. #7
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    It's uber easy it's simple trig.

  8. #8
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,863
    Reputation
    425
    Thanks
    8,598
    Quote Originally Posted by Crash View Post
    It's uber easy it's simple trig.
    yarr crash for CA minion

  9. #9
    _Fk127_'s Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    724
    Reputation
    16
    Thanks
    208
    My Mood
    Bitchy
    Code:
    if (forward || backward)
    			{
    				float sign = (forward ? 1.0f : -1.0f);
    				Posx += sign * 20.0f * sinf(Yaw);
    				Posy += sign * 20.0f * sinf(-Pitch);
    				Posz += sign * 20.0f * cosf(Yaw);
    			}
    Just a sample
    Last edited by _Fk127_; 04-24-2011 at 06:58 PM.



    Put this image in your signature if you support HTML5 development!

  10. #10
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    Quote Originally Posted by _Fk127_ View Post
    Just a sample
    if that works i will piss my pants

  11. #11
    _Fk127_'s Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    724
    Reputation
    16
    Thanks
    208
    My Mood
    Bitchy
    Quote Originally Posted by kibbles18 View Post
    if that works i will piss my pants
    lol thats not the whole thing



    Put this image in your signature if you support HTML5 development!

  12. #12
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    what header is sinf and cosf found in?
    yeah i know its not the whole thing. i just need to add my X Y Z pointers in place of the posx posy posz, and define forward/backward
    Last edited by kibbles18; 04-24-2011 at 07:04 PM.

  13. #13
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    Quote Originally Posted by ᴺᴼᴼᴮ View Post


    yarr crash for CA minion
    nuuu i nid NOOB's seal OF approvel

  14. #14
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,014
    Reputation
    58
    Thanks
    224
    #include <math.h>
    god damn...

  15. #15
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,863
    Reputation
    425
    Thanks
    8,598
    Quote Originally Posted by kibbles18 View Post
    what header is sinf and cosf found in?
    A LITTLE PART OF ME JUST DIED INSIDE.

Page 1 of 2 12 LastLast