I've seen many example projects and tutorials for the fps style game in unity, but none of them involve having a main character with an actual model (apart from the standard capsule). Can anyone explain how I would go about setting up an fps-type player character with an actual character model? I've tried lining up the camera to a character, but then the body of the character gets in the way. . . it seems that perhaps I need a player character that would be "seen" by the enemies (and myself when I die) and a separate arms+weapon model that would be seen only by the camera during gameplay - of course, I don't know how to do this. Any help on this seemingly basic issue?
Would you want to be able to see your body during the gameplay? (When you're still alive)
Most FPS games like Halflife, Quake, Unreal... don't have a playermodel. They have a special weapon model that consists of the actual weapon and the visible part of your arm. The model just contains things you want to see from your view. Sure, in multiplayer other players will have the "default/full" model.
While I, as the player, just need to see that weapon+arms model, I want to set it up so others (pretending this is multiplayer, for now) could see the actual mesh instead of just a capsule.
Answer by LoopyEL_BARTO
Nov 26, 2011 at 10:35 PM
well i've figured it out myself how to do it. download the free character pack in the asset store. once u downloaded it put in the game and put the mouse look script in spine 2. set the script in the "y" axis. position the cam and put in on clipping planes :near = 0.001 and leave the other one alone. position him and the way you want and parent the camera to the spine 2. then parent the right and left shoulder and the neck to the camera. then click on soldier(or swat which ever one u chose)give it a mouse look script and put it the "x" axis. add character control script, character motor script, and finally FPSInput Controller Script. then u should be ready to go.
How do you attach a mouse look to a bone? Late, I know, and now with Unity 5, but I still can't figure out how to rotate bones in Unity, and I want to use Legacy, not Mecanim.
Answer by bula
Dec 08, 2011 at 10:53 PM
Do you actually want a character for your game? Something like a soldier for your game? If yes you could : -Buy(Not recommanded) -Model it in : -Blender(I am using thsi is very good...) -Maya(If you wnat a bledner with money...:) -Cinema 4d (for good animation (awesome if want cartoons) -Orc Maker(if want orc) -Reel(of pro) -3DS Max(if want normal soliders with high graphics good quality so on...) Hope it helps :)
and add the script when you import it in unity 3d
Answer by dany
Apr 07, 2012 at 01:27 PM
I tried to create a character in this tutorial http://www.youtube.com/watch?v=6oo8NyalY6o&feature=context&context=C429fad1VDvjVQa1PpcFPQlaa0eKCF4E4LGroc-ZikDvREWnHK4s4= and it works great. In the midst of the spine will place empty object (lock) + Mouselook script and then the bone underneath the upper body. The problem is that the bone located under lock object loses its animation (eg reload, fire). Other bones works perfectly. how to get animation to work well under this object?
Answer by Wellington
Apr 09, 2012 at 02:03 AM
será que ninguem sabe fazer um FPS com personagem só tem tutoriais com a capsula, ou o pessoal tem medo de passar o seu conhecimento para as outras pessoas.
@Wellington, a resposta do LoopyEL_BARTO mostra como ele fez isso. Geralmente se usa uma cápsula porque ela tem o mesmo formato do collider, e em um FPS você não vê o próprio corpo - no máximo as mãos e os braços. Por isso, alguns fazem um modelo fajuta que só tem braços. Mas se for jogar em multiplayer, aí você tem de ter um modelo completo - que precisa das animações e de um script que as acione nos momentos certos. Como isso dá muito trabalho, quase sempre se usa a velha capsula.
Answer by nixtwiz
Aug 11, 2012 at 09:25 PM
Its actually really simple. Use render layers! I dont quite know how to set it up for multiplayer, but for being able to see yourself after you are shot it would be something like this:
You have two layers, an fps layer and a tps layer. set the fps weapon to the fps layer and the tps model to the tps layer.
You start with the camera always ignoring the tps layer. Then when the player is shot, you have the script change it to view the third person layer and ignore the first person layer.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users post good questions and use the site effectively we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
7 People are following this question.
FPS tutorial script doesnt work on my character?
I need to teleport a FPS chara controller
FPS - Full body player model
Random FPS player Audio when player kills enemies
A name For the Character Please Help