This will make sure the Player won’t be able to move up and down and has no added damping when rotating. Select Physics > Rigidbody in the menu that pops up, this will add a Rigidbody component to the Player so it can make use of Unity’s physics engine.Īdjust the Rigidody’s values like this: Set Drag to 1, Angular Drag to 0 and check the Y checkbox next to Freeze Position. To make this happen, select the Player in the Hierarchy window and click the Add Component button in the Inspector window. The Player GameObject will need to respond to collisions with other objects in the scene. Mesh Filter: The mesh data which is used to show a 3D model.Box Collider: A collider in the shape of a cube which can be used to detect collisions.It holds the position, rotation and scale of a GameObject. Tranform: Every GameObject comes with this component.Here are a few examples of the components Unity has built-in: This means all GameObjects are containers for components which can be attached to give it its behavior and properties. Unity uses an entity-component system to build its GameObjects. Position the Sphere at (X:0, Y:0.5, Z:0) and name it Player: In the Hierarchy, click the Create button and select Sphere from the 3D section. What’s a game without a hero? Your first task is to create a GameObject to represent the player in the scene. If your layout is different than in the screenshot, select the top-right drop down menu and change it to 2 by 3. There’s a small arena which will be the battleground for the game, a camera and a light. Getting Startedĭownload the BlockBuster starter project, unzip it and open the created folder in Unity. C# is used by millions of developers around the globe for application, web and game development and there’s a plethora of information and tutorials to help you out. While Unity also supports UnityScript and Boo, C# is the programming language that most developers tend to use, and with good reason. You can download the latest version of Unity here. This tutorial was written for Unity 5.3 or greater. If you need a refresher, check out our detailed Introduction to Unity tutorial. Note: This tutorial assumes you already have some experience with C# or similar programming languages and an understanding of Unity’s interface and workflow.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |