class-description NEWS COMMUNITY STORE LABS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE LABS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectNodeNode3DVisualInstance3DGeometryInstance3D CSGShape3D
The CSG base class.

This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot.

Enum Operation<>():Enum

OPERATION_UNION = 0

Geometry of both primitives is merged, intersecting geometry is removed.


OPERATION_INTERSECTION = 1

Only intersecting geometry remains, the rest is removed.


OPERATION_SUBTRACTION = 2

The second shape is subtracted from the first, leaving a dent with its shape.

bool calculate_tangents<>():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.

int collision_layer<>():int

The physics layers this area is in.

Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.

A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See Collision layers and masks in the documentation for more information.

int collision_mask<>():int

The physics layers this CSG shape scans for collisions. Only effective if use_collision is true. See Collision layers and masks in the documentation for more information.

float collision_priority<>():float

The priority used to solve colliding when occurring penetration. Only effective if use_collision is true. 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.

Operation operation<>():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.

float snap<>():float

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.

bool use_collision<>():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 collision_mask and collision_priority.

bool get_collision_layer_value<>( int layer_number=, layer_number:int=, ):bool

Returns whether or not the specified layer of the collision_layer is enabled, given a layer_number between 1 and 32.

bool get_collision_mask_value<>( int layer_number=, layer_number:int=, ):bool

Returns whether or not the specified layer of the collision_mask is enabled, given a layer_number between 1 and 32.

Array get_meshes<>():Array

Returns an Array with two elements, the first is the Transform3D of this node and the second is the root Mesh of this node. Only works when this node is the root shape.

bool is_root_shape<>():bool

Returns true if this is a root shape and is thus the object that is rendered.

void set_collision_layer_value<>( int layer_number=, layer_number:int=, bool value=, value:bool=, ):void

Based on value, enables or disables the specified layer in the collision_layer, given a layer_number between 1 and 32.

void set_collision_mask_value<>( int layer_number=, layer_number:int=, bool value=, value:bool=, ):void

Based on value, enables or disables the specified layer in the collision_mask, given a layer_number between 1 and 32.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...