[SOLVED] Shooting a Gun

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.

[SOLVED] Shooting a Gun

Postby rubenwardy » Tue May 08, 2012 12:15 pm

First thing: I know irrlicht is not a game engine, its a 3D render.

I am making a FPS, and have decided that animating bullets to come out is a bit unrealistic.
So what i want to know is if irrlicht, or a "plugin" can be used to take a pixel of the screen, and see what object is painted there.
(A bit like in BlitzBasic 3D).

If this is not possible then please tell me, or if this is a bad move.
Last edited by rubenwardy on Wed May 09, 2012 11:58 am, edited 1 time in total.
http://www.multa.bugs3.com/

str = "Ruben is a nerd";
cout << str_replace("nerd", " computer genius", str) << endl;
rubenwardy
 
Posts: 70
Joined: Mon Mar 05, 2012 4:51 pm
Location: SW England

Re: Shooting a Gun

Postby smso » Tue May 08, 2012 2:00 pm

Please clarify your question.

Regards
smso
smso
 
Posts: 218
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: Shooting a Gun

Postby hybrid » Tue May 08, 2012 2:05 pm

If you want to check if the bullet hits, you don't need a mesh or animation. Simply use a ray and some collision checks there. If it's jsut 2d you can also check pixel colors, but for 3d you need to have the correct projection for distance.
hybrid
Admin
 
Posts: 13947
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany

Re: Shooting a Gun

Postby Mel » Wed May 09, 2012 9:10 am

Erm... pull the trigger? and make sure you have the safety disabled?. :P

Well i don't know how blitzBasic3D is doing things, but i think you are refering to ray checks. Take a look at the collision manager of the scene manager.

http://irrlicht.sourceforge.net/docu/cl ... nager.html
This is what you may be looking for;
http://irrlicht.sourceforge.net/docu/cl ... 68a462f4a0
http://santiagong.daportfolio.com/
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
User avatar
Mel
Competition winner
 
Posts: 1783
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Shooting a Gun

Postby rubenwardy » Wed May 09, 2012 11:53 am

Thank you, this appears to be what i want.
I will check it out, thank you for the quick reply
http://www.multa.bugs3.com/

str = "Ruben is a nerd";
cout << str_replace("nerd", " computer genius", str) << endl;
rubenwardy
 
Posts: 70
Joined: Mon Mar 05, 2012 4:51 pm
Location: SW England


Return to Beginners Help

Who is online

Users browsing this forum: No registered users and 1 guest