Jump to content
  • Advertisement
Sign in to follow this  
wizardpc

help with shooting in FPS

This topic is 4698 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i want to know how to make a mesh that i have, (a laser/bullet) move in worldspace by clicking on the mouse. so basicly its like shooting a gun. i want the bullet to come from the screen coordnitates in the middle of the screen. any ideas how to do this?

Share this post


Link to post
Share on other sites
Advertisement
Have the bullet spawn at the camera's position and follow the (at the moment of fire) view vector. This is the simplest way to do it.

[Edited by - jfclavette on October 9, 2005 5:04:09 PM]

Share this post


Link to post
Share on other sites
Regardless of how you move the bullet, you'll need a velocity vector for the bullet. Once you have that, you need to find a way to move the thing. If you have a good enough physics engine, you just have to give the bullet a physics velocity and be done with it. If not, you'll need some sort of process system to move the bullet each frame or the bullet will have to have a "brain" that gets updated each frame to do the actual movement.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!