Collider: Difference between revisions
link to Object
|  (Created the page) |  (link to Object) Tags: Mobile edit Mobile web edit Advanced mobile edit | ||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| Collider, also called Hitbox is what determines whether the block is solid or [[Pass Through]]. | Collider, also called Hitbox is what determines whether the block is solid or [[Pass Through]]. | ||
| When a collision between two  | When a collision between two [[object]]s with colliders happens, it can be detected by a [[Collision]] sensor. | ||
| The collider of any custom block that isn't a [[Script Block]] can be changed by pressing the gear button. | The collider of any custom block that isn't a [[Script Block]] can be changed by pressing the gear button. | ||
| [[File:Collider settings.png|thumb|right|Settings for setting the collider and type of the [[custom block]].]] | |||
| [[File:collider  | |||
| A block's collider can have one of 3 possible values: | A block's collider can have one of 3 possible values: | ||
| Line 14: | Line 13: | ||
| == Details == | == Details == | ||
| Each part of a block not connected to itself by [[Glue]] will have its own collider. | * Each part of a block not connected to itself by [[Glue]] will have its own collider. | ||
| * The size of the collider depends on the size of that part.<br>For box colliders, it is a box with sides equal to the maximum size of the part in each of the 3 axes.<br>For sphere colliders, it is a sphere with the radius being the maximum length of the part in any of the 3 axes. This means sphere colliders are always spheres, they cannot be ellipsoids. | |||
| * If the block's physics type is Normal, the collider's center of mass will be the center of the block, even if it is outside the collider, which can produce unwanted results if physics are applied to that object. This can be changed by setting the type to Physics. | |||
| * Sphere colliders do not count voxels in more than one block space. That is, if a block like [[Arch]] is given a sphere collider, it will consist of two spheres, one for each block space. | |||
| == Notes == | |||
| * In [[Fancade Web]], you can enable collider display by typing <code>tg DebugPhysics</code> into the command line. | |||
| [[Category:Scripting]] | [[Category:Scripting]] | ||