Skip to main content
gamedev.net
🔒 Locked

FPS help...

Started by AI-Dev 4 replies 450+ views
Original Post
AI-Dev
AI-Dev
Okay, my brother asked me to help him with his fps project he is making. He asked me to create a separate program that a user could download that could ''aim'' for them if they were having problems. The game is completly 3d. I have X,Y,Z coordinates of the player AND target. I also have Bullet velocity and player/target velocity...I can access these various data anytime I want to use for the aim helper...I dont know what equation/formula I should use to do this...The weapons that i am making this for are instant fire and thus require no type of lead...If it also helps, I am using Visual C++ to make this.
hi2uall!!1
Jx
Jx
Sounds very much like a "I want to hack to autoaim and autoshoot for me" type question.... if it is, you won''t get many responses.

Post some more details about what you''re trying to accomplish and convince us that you''re not trying to cheat in Counterstrike online....

Jx
AI-Dev
AI-Dev
Whoa, 2 things wrong here...maybe you misinterpreted...but i''ll specify. 1) The game is not a online shooter, it is an actual fps game that my brother is making, that is the only way I actually know all the various player information.
2) He wants me to make the program as an ''add-on'' that players could download to help them aim.
It is not supposed to be used ''online'' as the game is only single player. I''ve helped him on other aspects of the game but i know more about level design than actual c++ programming of the aim-helper. That is why I posted on this forum because I thought you people could help me...If you don''t want to than I guess theres nothing I can do to stop that huh?
hi2uall!!1
dx elliot
dx elliot
This is pretty simple. I''m going to assume that the crosshair is always in the middle of the screen and the player has to rotate on the Y/X axis to move the crosshair.

Each frame if the auto aim is set to on,
-find the angle that the target is to the player on the XZ plane (how much the player must rotate on the Y axis until he is looking in the direction of the enemy)
-find the angle that the target is to the player on the YZ (you can find the angles using the Atan or Atan2 function, look them up on how).

And hmm, well actually that should be about it. Hopefully I didn''t make any mistakes. I don''t know the default direction for angles at 0 in your case depending on the API he''s using, so you may need to adjust things if something is off.
red_sodium
red_sodium
Why is it a seperate program and how does it integrate with the game?

Stay Clausal,

Red Sodium
"Learn as though you would never be able to master it,
hold it as though you would be in fear of losing it" - Confucius
Boogle55
Boogle55
Why does it have to be a separate program?
Would be much easier just having an option (controlled by global variable perhaps?), that will enable/disable some autoaim code. Then use what Lee_ said

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.