forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 0
class_area2d
Lukas Sägesser edited this page Jun 22, 2015
·
12 revisions
####Inherits: CollisionObject2D ####Category: Core
General purpose area detection and influence for 2D Phisics.
- void set_space_override_mode ( int enable )
- int get_space_override_mode ( ) const
- void set_gravity_is_point ( bool enable )
- bool is_gravity_a_point ( ) const
- void set_gravity_vector ( Vector2 vector )
- Vector2 get_gravity_vector ( ) const
- void set_gravity ( float gravity )
- float get_gravity ( ) const
- void set_linear_damp ( float linear_damp )
- float get_linear_damp ( ) const
- void set_angular_damp ( float angular_damp )
- float get_angular_damp ( ) const
- void set_priority ( float priority )
- float get_priority ( ) const
- void set_collision_mask ( int collision_mask )
- int get_collision_mask ( ) const
- void set_layer_mask ( int layer_mask )
- int get_layer_mask ( ) const
- void set_enable_monitoring ( bool enable )
- bool is_monitoring_enabled ( ) const
- void set_monitorable ( bool enable )
- bool is_monitorable ( ) const
- Array get_overlapping_bodies ( ) const
- Array get_overlapping_areas ( ) const
- PhysicsBody2D overlaps_body ( Object body ) const
- Area2D overlaps_area ( Object area ) const
- body_enter ( Object body )
- body_enter_shape ( int body_id, Object body, int body_shape, int area_shape )
- area_enter ( Object area )
- area_enter_shape ( int area_id, Object area, int area_shape, int area_shape )
- body_exit ( Object body )
- body_exit_shape ( int body_id, Object body, int body_shape, int area_shape )
- area_exit ( Object area )
- area_exit_shape ( int area_id, Object area, int area_shape, int area_shape )
General purpose area detection for 2D Phisics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). An Area2D can be set as a children to a RigidBody2D to generate a custom gravity field. For this, use SPACE_OVERRIDE_COMBINE and point gravity at the center of mass.
- void set_gravity_is_point ( bool enable )
When overriding space parameters, areas can have a center of gravity as a point.
- bool is_gravity_a_point ( ) const
Return if gravity is a point. When overriding space parameters, areas can have a center of gravity as a point.
- void set_gravity_vector ( Vector2 vector )
Set gravity vector. If gravity is a point, this will be the attraction center