CollisionObject

Inherits: Spatial < Node < Object

Inherited By: PhysicsBody, Area

Category: Core

Brief Description

Member Functions

void _input_event ( Object camera, InputEvent event, Vector3 click_pos, Vector3 click_normal, int shape_idx ) virtual
int create_shape_owner ( Object owner )
bool get_capture_input_on_drag ( ) const
RID get_rid ( ) const
Array get_shape_owners ( )
bool is_ray_pickable ( ) const
bool is_shape_owner_disabled ( int owner_id ) const
void remove_shape_owner ( int owner_id )
void set_capture_input_on_drag ( bool enable )
void set_ray_pickable ( bool ray_pickable )
int shape_find_owner ( int shape_index ) const
void shape_owner_add_shape ( int owner_id, Shape shape )
void shape_owner_clear_shapes ( int owner_id )
Object shape_owner_get_owner ( int owner_id ) const
Shape shape_owner_get_shape ( int owner_id, int shape_id ) const
int shape_owner_get_shape_count ( int owner_id ) const
int shape_owner_get_shape_index ( int owner_id, int shape_id ) const
Transform shape_owner_get_transform ( int owner_id ) const
void shape_owner_remove_shape ( int owner_id, int shape_id )
void shape_owner_set_disabled ( int owner_id, bool disabled )
void shape_owner_set_transform ( int owner_id, Transform transform )

Signals

Member Variables

  • bool input_capture_on_drag
  • bool input_ray_pickable

Member Function Description

Creates new holder for the shapes. Argument is a CollisionShape node. It will return owner_id which usually you will want to save for later use.

  • bool get_capture_input_on_drag ( ) const
  • RID get_rid ( ) const
  • Array get_shape_owners ( )

Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods.

  • bool is_ray_pickable ( ) const
  • bool is_shape_owner_disabled ( int owner_id ) const
  • void remove_shape_owner ( int owner_id )
  • void set_capture_input_on_drag ( bool enable )
  • void set_ray_pickable ( bool ray_pickable )
  • int shape_find_owner ( int shape_index ) const
  • void shape_owner_add_shape ( int owner_id, Shape shape )
  • void shape_owner_clear_shapes ( int owner_id )

Will remove all the shapes associated with given owner.

  • Object shape_owner_get_owner ( int owner_id ) const
  • Shape shape_owner_get_shape ( int owner_id, int shape_id ) const

Will return a Shape. First argument owner_id is an integer that can be obtained from get_shape_owners. Shape_id is a position of the shape inside owner; it’s a value in range from 0 to shape_owner_get_shape_count.

  • int shape_owner_get_shape_count ( int owner_id ) const

Returns number of shapes to which given owner is associated to.

  • int shape_owner_get_shape_index ( int owner_id, int shape_id ) const
  • Transform shape_owner_get_transform ( int owner_id ) const

Will return Transform of an owner node.

  • void shape_owner_remove_shape ( int owner_id, int shape_id )

Removes related shape from the owner.

  • void shape_owner_set_disabled ( int owner_id, bool disabled )
  • void shape_owner_set_transform ( int owner_id, Transform transform )