Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / First Person Shooter, Scope \ Ironsights troubles

Author
Message
Travis Gatlin
17
Years of Service
User Offline
Joined: 14th May 2009
Location: Oxford, Alabama
Posted: 8th Jul 2011 22:52
I have been having some trouble with the First person shooter im making, i want to implement Iron Sights and sniper scopes in the game but i am having trouble centering the gun to look down the ironsights or scope. Can anyone please show me how to do that? Thanks in advance.

Just in case this is needed, here's how i'm positioning the gun on the camera.



Your signature has been erased by a mod please reduce it to no larger that 600 x 120.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 9th Jul 2011 01:31
Why not remove the gun object completely, and replace it with a picture of the ironsights?

My signature is NOT a moderator plaything! Stop changing it!
Travis Gatlin
17
Years of Service
User Offline
Joined: 14th May 2009
Location: Oxford, Alabama
Posted: 9th Jul 2011 05:53
Well, since for the gunshot, im casting a ray from the gun's barrel and that would require moving and also i want the gun to actually move up into the player's field of view closer, not just appear there, that would look pretty bad.

Your signature has been erased by a mod please reduce it to no larger that 600 x 120.
Wolf
18
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 9th Jul 2011 13:50
Quote: "Why not remove the gun object completely, and replace it with a picture of the ironsights?"


That would just ruin the game. A cheap effect! I strictly advice against it.

@travis gatlin: I'm absolutely not the guy to talk code, but from an artists point of view I would suggest giving the gun an aiming animation that would make it move to the center of the screen. (depending on how you positioned it to the camera).



I make serious coffee - so strong it wakes up the neighbors.
http://serygalacaffeine.deviantart.com/
Twitter:@Serygala
Travis Gatlin
17
Years of Service
User Offline
Joined: 14th May 2009
Location: Oxford, Alabama
Posted: 10th Jul 2011 03:27 Edited at: 10th Jul 2011 19:24
yeah, good point, gonna be sort of hard to do though since Blender's camera is different from DBP's and it would be hard to get aligned. I also want my game to be Moddable and have easy implementation of the modder's own guns without making them do the animation themselves.

Edit:
Just forget the Scopes, all i need is ironsights i can use the same effects for the scopes as i do the ironsights, just when the scope gets to the right position, the gun dissapears and is replaced by a scope overlay.

Edit Again!
I found out, just replaced the preset values with variables so whenever i right click, it centers the gun.

Your signature has been erased by a mod please reduce it to no larger that 600 x 120.

Login to post a reply

Server time is: 2026-07-10 23:13:53
Your offset time is: 2026-07-10 23:13:53