- Unity 3.x Game Development by Example Beginner's Guide
- Ryan Henson Creighton
- 135字
- 2021-04-02 18:34:08
Time for action – Adding physics to your game
Let's tap into Unity's built-in physics engine by adding a Rigidbody component to the Ball.
- Select the Ball in the Hierarchy panel.
- In the menu, choose Component | Physics | Rigidbody.
- A Rigidbody component is added to the Ball. You can see it in the list of the components of the Ball Game Object in the Inspector panel.
- Make sure that the Rigidbody component's Use Gravity checkbox is checked in the Inspector panel.
- Click on Play to test your game.
- Click on Play again when you've recovered from how awesome that was.
No way! When you tested your game, you should have seen your Ball plummet straight down and land on the Paddle. How cool was that? If you answered "especially cool", give yourself ten points.
推薦閱讀
- Mastering ServiceStack
- Mastering RabbitMQ
- 企業級Java EE架構設計精深實踐
- SQL Server 2012數據庫技術及應用(微課版·第5版)
- DevOps入門與實踐
- INSTANT MinGW Starter
- 精通Python自然語言處理
- SharePoint Development with the SharePoint Framework
- Learning Laravel's Eloquent
- Advanced UFT 12 for Test Engineers Cookbook
- Building Slack Bots
- 網頁設計與制作
- Developing Java Applications with Spring and Spring Boot
- 一覽眾山小:ASP.NET Web開發修行實錄
- Windows 10 for Enterprise Administrators