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 / I can't fathom it out.

Author
Message
Scarlek
21
Years of Service
User Offline
Joined: 26th Nov 2003
Location:
Posted: 10th May 2004 20:03
I can move the camera forwards/backwards no problems but I can't for the life of me make it strafe left and right...

can someone just point me to the right camera control to use? I'll suss it out from there on...

Thanks in advance from a nOOb!

- Creating Games even I would play -
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 10th May 2004 20:15 Edited at: 10th May 2004 20:17
One simple way of doing this is...



[Edit]
Make sure you are using "Sync On" and "Sync" or this will give strange results...

Well... I hope I helped...

Previously known as "Game_Creator".
The question is, why am I talking to myself? ...... And more importantly, why am I waiting for a reply?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th May 2004 21:32
There are several ways to do this. That is one way.

Another is to calculate the new x and z coordinates and position there.



A third way is to get my Matrix1Extend1 plug-in that adds the move left/right/up/down commands to cameras



*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
ConorH
21
Years of Service
User Offline
Joined: 5th Feb 2003
Location:
Posted: 11th May 2004 00:11
If I were new Id probably go for the first option, considering he named this thread "Cant fathom it out"

its my new rat tail dog!
Social Disease
21
Years of Service
User Offline
Joined: 30th Sep 2003
Location: State of Confusion, beyond Denial...
Posted: 11th May 2004 07:53
Another option would be to create an object and then position the camera inside of the object. Then you use the Move Object Command, and the move object left, move object right commands.
Just reposition the camera at the objects location every sync!

another advantage of this method, is that it will make things simpler when you want to do collision.



Think Gad fro Spill Chock!
Scarlek
21
Years of Service
User Offline
Joined: 26th Nov 2003
Location:
Posted: 12th May 2004 19:09
Gamekit's code was pretty darn simple. /me slaps own head for not thinking of it. I'll stick with that for now although I'm interested in this plugin mentioned. Does it work for DBC?

Thanks all who helped! My first project... 'camera interface' is almost complete! (Just gotta add in some neat features that combine the best of joystick/mouse flight in space sims and rts action. mmm.. yummy and simple. (I think. )

No doubt when I move onto my next part of the project... 'levels'. I'll have even more questions! lol.

- Creating Games even I would play -
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th May 2004 21:07
Ah, you didn't mention it was for DBC ... I'm afraid that no plug-in of mine will work with DBC

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Scarlek
21
Years of Service
User Offline
Joined: 26th Nov 2003
Location:
Posted: 17th May 2004 15:19
Ok same subject, different problem. (ish)

The left 90, move, right 90 trick is great for strafe code buuuut for some reason this only works if my camera is not rotated left or right. If I rotate the camera 90 degrees and then strafe, I end up going backwards, not left/right This is my code so far...

Any ideas what's gone kaput? (lines 83-84 are where the problem lies..I think.)

Note: right mouse button rotates the cam, up arrow displays current cam info. Hold mouse on left/right edge of screen to strafe.

- Creating Games even I would play -
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 18th May 2004 17:31 Edited at: 18th May 2004 17:35
Don't mix "rotate camera" and "turn camera" code. Replace your code with this...



Well... Once Again... I hope I helped...

[Edit]
You may have to switch the -90's with the +90's if it is straffing the wrong direction.

Previously known as "Game_Creator".
The question is, why am I talking to myself? ...... And more importantly, why am I waiting for a reply?
Scarlek
21
Years of Service
User Offline
Joined: 26th Nov 2003
Location:
Posted: 18th May 2004 18:04
I love you - where shall I send the wedding ring?

Seriously, that makes soooo much sense I'd actually tried it myself but without the wrapvalue commands, I think I'll go read up on that little baby now!

Thanks so much for your help!

- Creating Games even I would play -

Login to post a reply

Server time is: 2024-11-26 17:30:57
Your offset time is: 2024-11-26 17:30:57