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 / DBC: 3rd person object strafing/crossair

Author
Message
Xender
18
Years of Service
User Offline
Joined: 28th Apr 2006
Location:
Posted: 8th May 2006 01:09
I have read a lot about this stuff on these forums through searching and doing tutorials, but almost everysingle way is compeltely different, and leaves me in confusion at the best way to go about it.

so i have a 3rd person shooter which im still working on and i have a few questions. i have read a lot of ways to make it so you can move with the mouse and then go in the direction its facing and strafe and stuff. but what is the best way to go about it because i ahve rad many different ways to do it, so essentially my q's are : 1) using 3rd person view what are the easiest/best ways to be able to rotate the camera (essentially the object) and then have it go in that direction and be able to strafe (cuz its 3rd person) and my main problem after many searches is 2) how to make a crossair, i was able to put the lil + symbol in the middle of the screen, but i cant check for stuff that way.. Thank you so much
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 8th May 2006 03:09 Edited at: 8th May 2006 03:12
There is no "best" method, its whatever suits your game's needs and your programming abilities. Take a glance at this post (if you havent already) for a (IMO) good description/mini-tutorial on using 2 methods (I recommend using the 2nd method I posted in this thread).

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

<EDIT>

Ah I see you've posted in that same thread , nevermind then... (Ill look at what you asked there and see if I can answer in this one)

<EDIT 2>

Im not quite sure what you're asking there. Any movement commands applied to a camera can be applied to an object if thats what you mean, just switch the word CAMERA to OBJECT, and fill in the object number. The examples I gave in that thread have strafing with an object.

If you're using DBP, there are the MOVE OBJECT LEFT and MOVE OBJECT RIGHT commands, pretty handy for quick straffing.

- RUC'

Xender
18
Years of Service
User Offline
Joined: 28th Apr 2006
Location:
Posted: 8th May 2006 03:51
well one of my questions is just how to make a simple crossair (or however u spell it) and my other one was just basically should i.......... dot dot dot...... im an idiot nevermind i just figured it out i thought for a second i was doing a first person thing and im not so .. yea nvm lol thanks for your help though.. but can u still help me with making a crossair please, idk how.. thank you
AbiVelj
18
Years of Service
User Offline
Joined: 7th May 2006
Location:
Posted: 8th May 2006 06:51
ok the way i went about is that i made a cross hair picture that had a dot at (0,0) and then made a quarter circle around it or whatever you'd like.... and however big u want it to be... just making sure that the first dot is at (0,0).... then my code looked something like this

This is me.... a game programmer....
Xender
18
Years of Service
User Offline
Joined: 28th Apr 2006
Location:
Posted: 11th May 2006 15:01
Hey thanks so much for your help, i got a crossair working, but now im wondering how i could make it so that in third person view, i could move the camera and it would rotate teh object and keep the camera behind it still, so if i moved my mouse right, the camera would move right, and the object would too, so then when i hit forward it would go in that new forward direction, i tried using OLdCameraX and stuff but it would rotate all funky and always go in the same direction. thank sso much if you can help.
Xender
18
Years of Service
User Offline
Joined: 28th Apr 2006
Location:
Posted: 11th May 2006 15:30
ok it wont let me edit yet because i still have to have my posts verified and editing wont work so i apologize for the double post. i just got dark basic pro and i have changed my code, but the same question still stands on how to use the mouse to rotate the camera. thanks
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 13th May 2006 06:22
here is some basic strafing code I made for a game



as long as sync is turned on, it should be pretty seamless

Login to post a reply

Server time is: 2024-11-26 21:24:06
Your offset time is: 2024-11-26 21:24:06