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 Professional Discussion / Rotate camera left and right when pressing key.

Author
Message
Red Eye
17
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 20th Mar 2010 22:46
Any ideas, i was thinking of a sin formula, wich would be set on when key would be pressed.

Like shaking the cam a bit when a key is pressed.

Any ideas?

Thanks,

Red Eye

...Kranox Studios!
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 21st Mar 2010 00:46
Simple, Graphing X=sin of Y will result in a squigly line so just use the changing X value to rotate the camera. Heres a quick demo.


If it hasn't exploded yet, I haven't touched it.
Red Eye
17
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 21st Mar 2010 12:39
I thought indeed something like that. Thanks buddy for your help! Real Thanks!

...Kranox Studios!
JLMoondog
Moderator
17
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 21st Mar 2010 14:36 Edited at: 21st Mar 2010 14:36
Did you want a 'free camera' look, the shaky 'realistic' movements they use in recent films?

One technique I've made is to make a hidden cube, place it at the camera position. Then move the cube outwards away from the camera in your desired direction behind your focal point. Then have the cube move and rotate in several axis every frame, then point the camera at it.

This will give you a nice 'free camera' look without the math. Greater the distance of the cube, the more subtle the movement. Closer you get, the more erratic the camera movement. Play around with the cubes movement speed and rotation speed and axis to get your desired effect.

I guess this would be considered a cheaters way out of this technique. Oh well, it works.


mike5424
17
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 21st Mar 2010 15:50
Shake:

Or something like that

---
Red Eye
17
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 22nd Mar 2010 13:36
Nice one Josh.

Thanks all, for the responds, i think i got it! Thanks!

...Kranox Studios!

Login to post a reply

Server time is: 2026-07-26 21:11:36
Your offset time is: 2026-07-26 21:11:36