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 Gun Bug

Author
Message
Tv Xxx
16
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 30th Apr 2008 22:28 Edited at: 1st May 2008 00:13
Ok, Firstly I Have Made A Video Showing The Bug, Instead Of Trying To Explain It...

http://uk.youtube.com/watch?v=7TCo1qnIyw0

As You Can See, The Gun Model Goes Out Of View Unless I Am Facing One Direction... Not Very Realistic

This Is What I'm Using To Load The Wepeon


and This Is What Is In The Main Loop


[EDIT] Object 3 Is The Main Rigid Physics Body, Its Bassically a Box The Size Of A Human

Any Ideas Are Ideas, So Please Post Away,

Cheers In Advance

Tv.

Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 30th Apr 2008 23:21
why don't you try:

Tv Xxx
16
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 30th Apr 2008 23:27
That Is Bassically The Same As What I Have Already, and It Doesn't Fix The Bug, But Thanks Anyways

Tv.

Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 30th Apr 2008 23:51
I think the order on how you have those 2 lines kindof screw it up.
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 1st May 2008 00:09
The weapon is object 1, but the camera is being set to the position/orientation of object 3. What is object 3? Then, you are moving the gun...object 1.

Why not just train the camera on the gun in the first place...after moving the gun, that is?
Tv Xxx
16
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 1st May 2008 00:12
oups

Object 3, is the main physics body, its a box, the height of the character, so the camera is set to the position of the rigid physics box, thats why I have done that.

and the gun has to be moved forwards to position it correctly.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st May 2008 00:15
I don't understand why you are positioning and moving the object in your loop when you already have it locked to your camera. You don't need to do that - that's why there is a lock object command. Lock the object, rotate and position it once, then forget about it.

Here's a quick mock-up:


See how the cube stays in position no matter how the camera moves?

Tv Xxx
16
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 1st May 2008 00:26
Lol IanM

Your Right Lol, Why Am, Its Locked On To The Camera, I Just Need To Set The Z Value Lol, Oups Lol, Its Been One Of Thoose Weeks, Ta Everyone

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st May 2008 01:13
Hallo.. instead of locking the object, we can move slightly the gun to be in front of the camera, and then apply to the gun and camera, same rotations.



oh my god

Login to post a reply

Server time is: 2024-05-05 08:42:41
Your offset time is: 2024-05-05 08:42:41