Skip to main content
GameDev.net gamedev.net
🔒 Locked

Ways to setup true first person viewpoint

Started by 3DModelerMan Jun 17, 2015 at 10:08 PM 2 replies 5.8k views
Original Post
3DModelerMan
3DModelerMan

So, I've been working on building an FPS lately, and I'm really hyped for VR. The arms parented to the camera approach isn't really going to cut it anymore for VR games, so I decided I'd make a thread about true first person. I think it would be really great if people could post all their ideas/experience related to implementing a true first person viewpoint, because it seems to be a very difficult issue. If we could get like a true first person megathread going here that would be awesome. I'll start with some of the obvious things I've been able to pick up in my searching so far.

  • Aim offset animation poses based on camera pitch and yaw. The Unreal engine has a dedicated blend space for this, but I've seen implementations in Unity and other engines too using regular animation blending.
  • Rotating the top of the player's body separately from the feet and making the feet follow after 90 degrees is important, or else rotating your view looks really weird. I'm actually planning to make a post describing how I implemented this at some point once I've got it working perfectly, there's a couple more improvements I'd like to make before it's worth showing off.
  • I know a lot of people just parent the camera to the head bone, but I didn't like how much head bob that introduced, so I ended up just setting the camera position to (head bone position)+(offset in front of head bone) cause it makes it easier to prevent head bobbing in response to animation by adding some tolerance so that tiny movements of the head bone don't affect the camera position, but large ones do (bending over or leaning forward for example).

If anyone has knowledge/tips/whatever to add that would be great. There's not many good resources online that I can find explaining how to go much further than what I already wrote here. One thing I'm still researching is how to get aim down sights to work right. I had a system where I blended between cameras setup for a bit, but it didn't work too well cause I couldn't keep the gun level and it screwed with aiming.

deftware
deftware

You could just have the camera on the head bone, and dampen it out, so that it's effectively 'chasing' the headbone, instead of solidly fixed to it.

[ deftware.org ]
Brain
Brain

I knew i'd seen a good video on this before. You basically use the third person template and drag the camera into the model's head, then you key some blueprint script to it to make the camera remain within the player's head as they move. Essentially what deftware said.

Let me know if this helps!

Stainless
Stainless

You could just have the camera on the head bone, and dampen it out, so that it's effectively 'chasing' the headbone, instead of solidly fixed to it.

No, any kind of time delay between the player moving and the camera moving can be horrible.

You get cases where you can look down inside the body mesh, see the inside of your own neck, etc. It destroys the players immersion and ruins the game.

What you need to do is add some physics to the body to dampen the animated portion of the movement.

You also need to separate the body into multiple animations. Resolve the body first. Work out spine twist and bend to make the camera view and position match a realistic estimation of the players body shape. Then start working out other portions of the animation. Make sure you detect the case when the heads view vector is greater than about 60 degrees from forward. It's at this point the spine starts to twist. If you look down and see your own shoulder in the wrong place it just feels so, so wrong.

The camera response to player movements is so important. You want the lowest latency you can possibly achieve. Any significant delay between head movement and camera movement eventually causes nausea in most people.

Do you have hand positions mapped in 3D?

Combining head and hand movements into a believable body pose is a nightmare. It's a subject worthy of it's own thread. wacko.png

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.