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.

Newcomers DBPro Corner / Camera Pointing with the mouse

Author
Message
DivW
21
Years of Service
User Offline
Joined: 31st Jul 2003
Location: Scotland
Posted: 11th Aug 2003 04:10
Before i ask this, i'd like to make one thing pretty clear: getting any sort of message into my thick skill can be a daunting task. I'm trying to make a basic camera and movement system. But right now i'm trying to find a way to make the mouse move the direction the camera's facing, like in half life and any other shoot-em-up. This will eventually be a shoot-em-up, but right now i'm working on making a half-life like control scheme. While i'm on the subject, i used the inkey$()= command to make the computer respond to the 'w' key, but while w key is pressed it interupts the arrow keys. So both can't be pressed at once. If anyone knows how to fix this, can you drop by and tell me please? And if anyone can take the time to drop by with a code for mouse camera control, than i'd be a happy bugger.
-DivW
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 11th Aug 2003 04:32 Edited at: 11th Aug 2003 04:33
try this for the mouselook....it is in the darkbasic programs examples...

note:this is from the darkbasic examples section.

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
DivW
21
Years of Service
User Offline
Joined: 31st Jul 2003
Location: Scotland
Posted: 11th Aug 2003 04:57
Hooray! I'm on a roll tonight! Thanks for your post Bishop, but by the time i'd read it i'd allready figured out a way odo it myself. My next step will be gravity. I've heard a lot about Gravity. I'm going to need it if i' to put in a jump command. So far, i have run, walk, duck, and i'm going to do strafe soon. I also now have mouse look. Plus when you click it bang gets written on the screen, sort of a joke thing till i put a gun in. Basically i'm working on an engine in a test environment right now, containg a square which the camera walks through and a small matrix which the character walks on, sticking to the contours. Basically, i have few steps left to my movement engine:
1) Strafing (which i can do myself i think)
2) Gravity (eep...gonna need help with that one)
3) Jumping (If i can figure out gravity, then i can do jumping myself i recon)

Well anyone got info on Gravity that they would part with?

Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 11th Aug 2003 09:52
goto help/examples/sliding collision(in basic 3d section)
would write code, but gotta go

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
DivW
21
Years of Service
User Offline
Joined: 31st Jul 2003
Location: Scotland
Posted: 11th Aug 2003 15:53
Hey Thanks Bishop. I didn't know that example was there. Ok, i'm trying to get a gun to stay on the screen now so that i can get right into the fighting part of my engine.

Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 11th Aug 2003 16:10
"lock object on object number" locks the object to the screen. "Position object" then positions the object relative to the screen, rather than the origin.

cuRant PRogekt: a three-de map editer
Why the hell'd you ask me for crying out loud!?!
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM

Login to post a reply

Server time is: 2024-09-20 19:49:16
Your offset time is: 2024-09-20 19:49:16