I
I
ikeky2020-05-27 10:18:01
Unity
ikeky, 2020-05-27 10:18:01

How to make a non-shaking First-person Shooter camera with subsequent adaptation to Third-person shooter?

The author with a meager vocabulary, please understand and forgive. There is not normative vocabulary because I like it so much.
Dying Light
5ece130571bb6304642108.jpeg5ece12fd0f97d901852562.jpeg
First of all, I would like to draw your attention to the fact that here the modders did not bother with adapting the animation for Third-person, since the developers did it for them. (presumably this was made for co-op)

In my opinion, the first person camera in Dying Light is simply divine, I have never seen such a responsive character in games, so I can only praise the programmers for being excellent.

Mirror's edge
Here are screenshots from a game similar to the genre:
5ece13333dae4412879467.jpeg5ece1336bffed701410458.jpeg
Here, as we can see, a character model is also added, although during the passage, we see only Faith's legs and arms.

Reality
I tried to do something similar to Unity:
https://www.youtube.com/watch?v=pEc_HTRnrt8
(video with sound)
mde) I'm not much of a programmer.

Alpha version
Before that, I made another prototype of the same camera, but with a significant difference: now adding the camera to the model, and not vice versa. And I made the movement of the model itself dependent on the rotation of the camera through the Two Bone IK Constraint script (this is from the Animation Rigging Package).
https://www.youtube.com/watch?v=6F8raVZXfjs
Here, in general, the result turned out to be cool, but the problem is that the camera depends on the model, that is, if I add a walking animation, the camera will frantically fuck in all directions, in other words shake.

Okay, I thought, but then I came up with the idea of ​​creating a phantom character body. That is, I copied and pasted the same model into the FPScontroller, and now I added the camera there, but now in this model I will not turn on the walking animation, thus the camera will not fuck up.

But now there was a problem, now the camera began to lag behind the model. I haven't been able to solve this problem yet.

I used Unity 2019.3.2f1, from package I used the same Animation Rigging and Animator. I used a model from Mixamo, animations from the same place.

If you are a unity guru, please advise different resources, videos or articles on how to do this.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question