First Person View - Looking Up and Down

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
jack
Posts: 13
Joined: Tue Oct 30, 2007 7:48 pm

First Person View - Looking Up and Down

Post by jack »

I've looked everywhere for a solution to this, but can't find anything.

If using a first person view to play your game, you would want your viewpoint to be transmitted to all other players of your game so that they can render your player model properly. For example, if you looked up you would want your player model to look up.

As far as I can tell, you can only do this if you look left or right by rotating your entire character model along the Y-axis (presumably).

I am unable to find a method for doing this for looking up and down, as basing it on character rotation would rotate the entire character when instead you would want only the head (or top half of body) to move.

Does anyone know how to do this?

Thanks.
ultran00b
Posts: 35
Joined: Tue Oct 30, 2007 3:30 pm

Post by ultran00b »

You mean if the character looks down, you want the model to look down, but can't figure out how to do it without rotating the whole model?

I know a game where this is implemented quite nice. What they do is this:
They made a character model out of three models: the legs, the torso, and the arms. When the player looks down, the top half of the body rotates downward.

Is that what you mean?
Use the debugger, young Skywalker...
SwitchCase
Posts: 170
Joined: Sun Jul 01, 2007 11:41 pm
Location: Manchester, UK

Post by SwitchCase »

Using multiple models for a single character would probably look pretty crappy, rotating those models separetly would probably look super crappy.

If it were me I'd use an animated mesh, of which has an animation that makes the head tilt up and down. You would calculate the frame of the animation to be set, based upon the angle of the first person camera. Or something similar to that. but maybe this woldn't work, iv'e never actually tried it, it's just what comes to mind. =)

Good luck.
Praetor
Posts: 42
Joined: Wed Jun 20, 2007 2:31 am

Post by Praetor »

That or you could use the new animation system to dynamically control a skeletal joint for the neck or torso. I havn't used the system yet so I'm not sure on the specifics of doing that but I know it is possible.
"Surely we don’t need to waste resources on pathfinding; they just need to walk along the shortest route from one place to another." - EA Producer
SwitchCase
Posts: 170
Joined: Sun Jul 01, 2007 11:41 pm
Location: Manchester, UK

Post by SwitchCase »

Even better Praetor. Now why'd I not think of that.
Post Reply