Leaning the camera
by Duane Richards · in Torque Game Engine · 10/29/2001 (8:14 am) · 5 replies
I have seen a lot of post replies from Tim and others about updating clients, animating servers, etc. There is a lot of good stuff.
But I still need help. I have been working in Player.cc and camera.cc, adding a new leaning variable that allows a player to lean left and right (for peering around corners, etc.). Anyway, I was successful in shifting the render position based on a keystroke but I ran into two problems.
The first is, I am only translating X axis in world space, not the character space. In otherwords, when my player starts out, I can shift the render left or right, but when the player turns 90 degrees, he is then shifted forward and back, not left and right.
The second problem is, I am actually changing the render position, not just the head or camera position. The whole model shifts left and right. That is not quite what I want.
Please help with any hints or direction!! Thanks a lot!!
But I still need help. I have been working in Player.cc and camera.cc, adding a new leaning variable that allows a player to lean left and right (for peering around corners, etc.). Anyway, I was successful in shifting the render position based on a keystroke but I ran into two problems.
The first is, I am only translating X axis in world space, not the character space. In otherwords, when my player starts out, I can shift the render left or right, but when the player turns 90 degrees, he is then shifted forward and back, not left and right.
The second problem is, I am actually changing the render position, not just the head or camera position. The whole model shifts left and right. That is not quite what I want.
Please help with any hints or direction!! Thanks a lot!!
#2
10/31/2001 (10:29 pm)
But by changing the animation, will it really change the user's view? I do need to change the animation so it looks like the player is leaning (that way his head can get shot off when he peeks around a corner). The more important part of that, though is to get the First-person view to shift left or right to actually see around corners.
#3
Phil.
11/01/2001 (1:59 am)
Take a look at the camera tut that was posted around a while back. Its got more than enough info to do what you need. From there you'd only need to add the anim for peek left and right.Phil.
#4
I can't find the tutorial you mention, do you know the title or author so I can search for it?
Thanks!
11/05/2001 (3:04 pm)
Phil,I can't find the tutorial you mention, do you know the title or author so I can search for it?
Thanks!
#5
http://v12.ultimagroup.com/article.read.asp?article=28
11/07/2001 (7:16 am)
I do believe this is it:http://v12.ultimagroup.com/article.read.asp?article=28
Torque Owner Josh Albrecht
But I dont think you really want to change teh player position. What you should do is just make an animation that leans the player over.... :)