unity中物理组件的添加
One of the core foundations of most games, whether they be 2D or 3D, is the Physics involved in them. Physics need not be complicated stuff like wave equations and fluid dynamics. Even the most basic stuff that you do in making a game involves physics.
不管是2D还是3D,大多数游戏的核心基础之一就是物理原理。 物理学不需要像波动方程和流体动力学这样的复杂事物。 甚至您制作游戏中最基本的内容都涉及物理。
For example, moving the player generally involves either adding a force on the object that is the player, or displacing it by a certain amount. Making it float or drown in water, or just slide down slopes is also involved with how physics work.
例如,移动播放器通常涉及在作为播放器的对象上施加力,或将其移动一定量。 使它漂浮或淹没在水中,或者只是滑下斜坡也与物理学的工作方式有关。
Physics in Unity, and in general game design, are really important. Most of the time, it's the physics of a game which cause "bugs"
or "glitches"
. Some examples of these would be OoBs (Out of Bounds) and clipping errors.
Unity中的物理以及一般游戏设计中的物理非常重要。 在大多数情况下,游戏的物理原因会导致"bu