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 / A Camera Snippet using geometry

Author
Message
Vathelokai
15
Years of Service
User Offline
Joined: 3rd May 2009
Location:
Posted: 22nd May 2009 08:02
Hi all. I picked up DBPro about a month ago and have been lurking for just as long. I have a background with basic (nothing flashy), so I haven't had to fight a learning curve.

Anyway, I was looking around for camera snippets to put together a 3rd person, switch between selected players sort of thing. The things I found didn't quite do what I needed (though the 'match camera to player then move camera back' trick is ingenious), so I wrote some code to make it work for me (inspired by 300happy's snippet from the codebase [I think]).

My apologies that there are no remarks; I did try to make the variable names as clear as possible though.


I was thinking I would put this in the CodeBase or Snippets and would love to get feedback on how to clean/improve/optimize this stuff. Also, I'm pretty proud of my self, as this is my first DBPro project

Anyway, nice to meet you all.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 23rd May 2009 03:04
Cool . I couldn't move the sphere though-- when I pressed WASD nothing seemed to happen.

<-- Spell based team dueling game!
Vathelokai
15
Years of Service
User Offline
Joined: 3rd May 2009
Location:
Posted: 23rd May 2009 03:45
I used inkey$() to get the inputs. I'm not sure how that works on other machines/versions. Learning how inputs work is on my short list of things to get down.
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 23rd May 2009 15:22
you can also use keystate, you just give it the Key ID and it tells you if the key is pressed, so you can make it go diagonal

(\__/)
(O.o )
(> < ) This is Bunny. Copy Bunny into your signature to help him on his way to world domination!

Login to post a reply

Server time is: 2024-09-28 06:18:34
Your offset time is: 2024-09-28 06:18:34