• Status: Solved
• Priority: Medium
• Security: Public
• Views: 306

# Camera Turn

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.

Regards
Hari
0
srihari1986
• 2
1 Solution

*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.

~Aqua
0

Author Commented:
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...

Regards
Hari
0

*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.

~Aqua
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.