Camera Turn

Posted on 2005-05-15
Medium Priority
Last Modified: 2010-04-07
Hi Aqua,

In the earlier Camera Method you provided me , does the turn method just turn from the same point.I think it does not , it just take a round turrn.But i wanted it to take a turn from the same point.Can you help me on this.

Because when i take a turn near the wall.I should be able to see the wall but instead i am not able to.I amd see the other side of the wall.

I tried changing the looking radius but it does not change anything.

Question by:srihari1986
  • 2
LVL 10

Expert Comment

by:Andrew Beers
ID: 14007748
*blinks*  The turn method turns about a point with a unit circle of diameter 1 unit.  Changing the look radius will not keep your user from looking "through" your wall... it only affects the jumps of angles.. well... sort of...  

The way you can keep a user from looking through the wall is use a farther collision line further from the wall...  If you still have a problem looking through the wall perhaps you have some toying to do with your normals or lighting..  The camera class allows you to move and turn as if you were a real person moving about a scenery... And unless you keep the player from walking through the walls you will always be able to pass through a wall... *shrugs*  ...Perhaps I'm missing your question but... *shrugs*  ...The class allows you to rotate about a central point by pressing 4 and 6... Look up and down by pressing 8 and 5 and strafe while using 7 and 9.   If you want to walk forward and backward using 1 and 0.

If I'm missing your question please point me a bit in more of a specified direction.


Author Comment

ID: 14007760
Hi ,

My question is ...If i want the user to turn, i dont want him to do a turn by a circle.I just want him to turn from the point he is standing.

SOmething like , i dont want the camera to move from the place when i turn , i just need it to turn backwards when i press 4 or 6...

LVL 10

Accepted Solution

Andrew Beers earned 2000 total points
ID: 14007921
*blinks*  You want the camera to rotate just so you are looking in the reverse direction from your current direction?  The current idea of the turn rotates the looking point about a circle while the center point stays constant...  Aka.  the camera does not move...

I guess what you are asking is that you just want the camera to look 180 degrees from the current looking point?  I see no real point in this but is is VERY simple to change... just make the rotate difference PI or 180 degrees...  Am I hitting at the real question now or am I still missing the boat?  The camera does pivot about a stationary point if that is what you are refering to...  to do a turn without using a circle is impossible as that is how the glLookAt() function works.  You have the camera position and the camera look at position... this is the way it works...  and is the way the camera works for almost every graphics language out there dealing with 3D space.

I hope I helped out...  I'll keep an eye out.


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
Screencast - Getting to Know the Pipeline
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question