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 Discussion / efficient gun position code?

Author
Message
devastation
19
Years of Service
User Offline
Joined: 11th Aug 2005
Location:
Posted: 20th Sep 2005 22:16
I spent a few hours making some gun position code of my own from scratch, and it sucked, so I am using some simplified code from the ICED demo that comes w/ DBC. It works okay, but there's a huge problem. If you're facing one side and look up and down, the gun points up and down the right way, but if you're facing the other direction, it faces the opposite way on the X axis. I'm not sure if it's that I'm using a .x level or what, but it kind of kills the game.

I've looked in the codebase and throughout the forums and cant find any entrys on gun positioning, so does anyone have any good code they'd lend me? Thanks in advance!

And I don't want to use lock object on, as I want to do a lot with shadows in my game and I want the projectile to start in the gun. It's the paintball post a couple pages ago (the one with the broken screenshot links).
Leeorg
19
Years of Service
User Offline
Joined: 5th Jul 2005
Location:
Posted: 20th Sep 2005 22:44
Err - its hard to say without any code posted. Are you using Camera Pitch Up and Camera Pitch Down commands? They work better then Camera Rotate in that they actually do what you want the camera to do
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 20th Sep 2005 23:12 Edited at: 20th Sep 2005 23:24
Zotoaster gave me some back in the newcomers corner when I asked - I don't know why it works though, and have a horrible feeling it's slipped off page 1 -- I'll see if I can dig it out...

Edit: http://forum.thegamecreators.com/?m=forum_view&t=59690&b=7

that should be it -- it's near the bottom though

(If you can figure out why this works, can you tell me please -- it's not quite right when you look up or down, and I might know what's wrong with itif I know why it works (Sorry if I hi-jacked your thread though))

...maybe one day I'll finish a project
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 22nd Sep 2005 15:53
Lol, i was just about to post something like that till I noticed that you already posted it for me


devastation
19
Years of Service
User Offline
Joined: 11th Aug 2005
Location:
Posted: 23rd Sep 2005 23:43
Anytime, Zotoaster. Anytime.

Login to post a reply

Server time is: 2025-05-22 14:19:28
Your offset time is: 2025-05-22 14:19:28