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.

Author
Message
Fredyssun
16
Years of Service
User Offline
Joined: 30th Oct 2009
Location: Germany, Bavaria
Posted: 24th Apr 2010 16:12
Hey ive got a problem with my camera Im working on.

I want to get the camera rotated around the object while the q key is pressed. That works fine so far, but after I don't press the q key anymore the camera doesn't "watch" to the cube like before anymore. Ive made also a short video of my problem: http://www.youtube.com/watch?v=nA2BXUwZH-0

And here's my code:


I hope you can help me

It's not a bug it's a feature
Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 25th Apr 2010 04:34
Hi, I believe I have solved your problem. Is this what you were trying to achieve?



The difference is I added the 'Set camera to object orientation' command. I have commented where I have added it. Hope this is the solution

A clever person solves a problem, a wise person avoids it - Albert Einstein
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 25th Apr 2010 08:46
this is very simple just add "point camera camno,object position x(objno),object position y(objno), object position z(objno)" within the do-loop.

camno is the camera number.
objno is the object number(in your case is the cube).
Fredyssun
16
Years of Service
User Offline
Joined: 30th Oct 2009
Location: Germany, Bavaria
Posted: 25th Apr 2010 10:00
tank you Hodgey and basjak. Both solutions are very good =)

It's not a bug it's a feature

Login to post a reply

Server time is: 2026-07-27 20:17:50
Your offset time is: 2026-07-27 20:17:50