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
    127

    [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
    127
    i have a feeling this requires a lot of thinking...

  4. #4
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,008
    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
    127
    wehr d0 i dl mat h?

  6. #6
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,008
    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,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    It's uber easy it's simple trig.

  8. #8
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616
    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
    720
    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 05: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
    127
    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
    720
    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
    127
    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 06:04 PM.

  13. #13
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    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,008
    Reputation
    58
    Thanks
    224
    #include <math.h>
    god damn...

  15. #15
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616
    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