Instance Methodmigueldeicaza.swiftgodot 0.45.0SwiftGodot
setCollisionMaskValue(layerNumber:value:)
Based on value
, enables or disables the specified layer in the collisionMask
, given a layerNumber
between 1 and 32.
final func setCollisionMaskValue(layerNumber: Int32, value: Bool)
Other members in extension
Types
Type members
Instance members
var calculateTangents: Bool
Calculate tangents for the CSG shape which allows the use of normal maps. This is only applied on the root shape, this setting is ignored on any child.
var collisionLayer: UInt32
The physics layers this area is in.
var collisionMask: UInt32
The physics layers this CSG shape scans for collisions. Only effective if
useCollision
istrue
. See Collision layers and masks in the documentation for more information.var collisionPriority: Double
The priority used to solve colliding when occurring penetration. Only effective if
useCollision
istrue
. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level.var operation: CSGShape3D.Operation
The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent.
var snap: Double
Snap makes the mesh vertices snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust.
var useCollision: Bool
Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden. See also
collisionMask
andcollisionPriority
.func getCollisionLayerValue(layerNumber: Int32
) -> Bool Returns whether or not the specified layer of the
collisionLayer
is enabled, given alayerNumber
between 1 and 32.func getCollisionMaskValue(layerNumber: Int32
) -> Bool Returns whether or not the specified layer of the
collisionMask
is enabled, given alayerNumber
between 1 and 32.func getMeshes(
) -> GArray Returns an
GArray
with two elements, the first is theTransform3D
of this node and the second is the rootMesh
of this node. Only works when this node is the root shape.func isRootShape(
) -> Bool Returns
true
if this is a root shape and is thus the object that is rendered.func setCollisionLayerValue(layerNumber: Int32, value: Bool
) Based on
value
, enables or disables the specified layer in thecollisionLayer
, given alayerNumber
between 1 and 32.