====== Rigidbody (UnityComponent) ====== Rigidbody is required to enable physical behavior of an object (drop by gravity, collision, etc.). * [[https://docs.unity3d.com/ja/current/Manual/class-Rigidbody.html |Rigidbody Unity manual]] ==== Summary of Colliders in VCI ==== * For information on the synchronization of physics, refer to [[en:vci:component:sdk:subitem:owned| Relation between ownership and synchronization of SubItem]] * The extent of influence by Rigidbody is also determined by [[en:vci:component:sdk:subitem:groupid|GroupID of SubItem]]. * Required to use onCollision function of [[en:vci:script:reference:eventfunction|VCI event functions]]. ==== Properties ==== ^ Property ^ Feature^ | **Use Gravity** | When enabled, **the object will be affected by the gravity and fall** | | **Is Kinematic** | When enabled, **the object will not be moved with physics engine**.\\ However, you can still move the object by controlling Transform directly.\\| | Mass | Mass of the object (Kg) | | Drag | How much air resistance affects the object when moving from forces | | Angular Drag | How much air resistance affects the object when rotating from torque | | Interpolate | Not used in VCI. | | Collision Detection | Used to prevent fast moving objects from passing through other objects | | Constraints Freeze Position | Limits the movement. The object does not move in the checked axis | | Constraints Freeze Rotation | Limits the movement. The object does not rotate in the checked axis | To freeze a VCI in the air, disable "Use Gravity" and enable "Is Kinematic".\\ ==== Examples ==== * [[en:vci:sample:oncollision:no1| Create a drum that plays a sound and an animation when hit]]