The Unity 3d Game Development character setup all animation
Hello friend's I told you how to setup your character for unity game engine. So let's stat
How To Create Your Project For Unity Game Engine
Friends unity engine open and create a new project. First select project name and what type you create your project 2d & 3d you choose 3d project and then you create. Then all unity game engine create directory and file create unity game engine.
How To Setup Your Plateform
Friends first go to Google and search free 3d model com. Then you choose your plateform
You any want. Then download your plateform
And extract your zip file. After then drag you
Fbx, oja any file unity game engine. Then Hierachay section drag you plateform. Then
Assets section right mouse click create material. Material selecte you see the all property for material the select your material
Image. Then drag your material for your plateform. You see change your plateform color. Select you plateform inspector section
Add the Boxcloidor. Your need Acourdig select your Colidor . Then your plateform is ready now walk your character.
How to setup your character for unity game engine
Friends first google search mixmo.com and
go chose your character download. Then choes
Animation you character. After that download
All animation just like idel, walk, Attack Animation. Then friends drag your mixmo character and all animation for unity game engine for assets section. After that create floder move your all character animation.
Now this time select your And drag Hireachy
Section. You see the Inspector section scal your
Character size just like 2.5. Then frieds asset section select your character and inspector section rig Select humnoid, material section select use Extra material, then apply and all
Animation same selection. Then go to Hirechy
Section and select your character then right mose click and create empty Game Object right mosuse click rename it. Player first drag the player Silglurly after that character drag the player character is the player child. Then friends player select inpetor section add the
Rigidbody then add Capsulecolidor your according adjust you capsule. Then frieds add
The script. Crate your script name you anything want. Then frieds open your script
Monodev and visual Studio open it.
How character script for unity game engine
First I told you some function void stat, void Update, void FixedUpdate. This time I told you
3types of function.
void Start ():- This function all Insilised all stat
Just rigidbody, Animator Other of etc.
Void Update () :-this function evey frame in the
Updates just like press the key and player movement here.
FixedUpdate () :- Friends this function all update for fixed just like player all animation.
Friends writing the script:- Fist insilied your varival
Public flot speed;
Public flot movedirction;
Public bool faceingright=true;
Private Rigidbody rig;
Void start() {
rig= Getcomponent<Rigidbody>() ;
}
Void Update () {
movedirction= Input.GetAxes("Horizontal") ;
}
Void FixedUpdate () {
rig.velocity=new vector2(movedirction*speed, rig. Velocity.y) ;
}
Void Flip() {
}
First setup input.GetAxes yor character moveMent setup. Now friends go to the unity engine run the script inspector section script
Section speed input 5 and play the game. Your
Pc keyword key input A & D you look player
Movement.
No comments:
Post a Comment
Please do not Enter any Spam link in the Comment Box