I am working on a game character using Unity. I'd like it to be playable in 3rd Person and 1st Person depending on what the user chooses (switchable in game whenever ideally).
I've worked on and read many examples all using different techiniques (some don't have any mesh for the player and just have a gun; others have no gun at all, just aiming; some use basic geometry only like cylinder and sphere bullet and dont really work when i try using high-poly human like etc).
So I am trying my own ideas and feel like maybe it's impossible for me to make a properly decent game character :[
Here is exactly what I have so far:
a) Mixamo 'Passive_Marker_Man' with idle-rifle-aiming animation.
b) SetIKPosition/Weight for each hand to specific transforms on the gun object.
c) Guns 'butt'/base is the gun objects pivot/origin.
d) The gun is spawned at a transform i made near the models right shoulder
e) Added child object Sphere to player 10 units forward on Z axis
f) Mouse movement on Y moves gun/sphere up and down; mouse X rotates entire player object left/right.
g) SetLookAtPosition IK also done to make head always look at sphere (gun is also always pointed at sphere)
h) camera is set to a position between the two eyes on every frame, and is set to lookAt the sphere.
......When i view this from a 3rd Person perspective it looks pretty good, the guys eyes follow his guns aim, which is pointing nicely at the sphere 10m away.
But if I view it in 1st Person, I can see inside the gun and parts are chopped off etc (aka clipping????)
So am I going about this all the wrong way. It felt so right at some points but now I can't imagine how to stop this kind of thing from ruining the character.