Let’s set the position to be 2.5 so it can sit just above the player’s head. Next, we’ll add a new Child Node to the Player node ( Ctrl+A) of type Camera. We’ll also set the Y translation to 1.25 so that the collider just sits above Y zero. We’ll set the rotation degrees to 90 on the X: Select the Capsule in the Inspector, and set the Radius and Height to 0.5 and 1.5, respectively. In the Inspector panel, we can set the Shape property to ‘ CapsuleCollider‘. Next, add a child node ( Ctrl+A) of type CollisionShape. We’ll rename the node to “Player” and save it as “Player.tscn”. For more information, visit the documentation: It also has a built-in API for moving objects. KinematicBody is a type of body that is not affected by physics, and it can only be moved by code or by an AnimationPlayer. Go to Scene > New Scene.Ĭlick on ‘ Other Node‘ and create a new Root Node of type KinematicBody. In this lesson, we’re going to create our player object.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |