class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectRefCounted KinematicCollision2D
Holds collision data from the movement of a PhysicsBody2D.

Holds collision data from the movement of a PhysicsBody2D, usually from PhysicsBody2D.move_and_collide(). When a PhysicsBody2D is moved, it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned.

The collision data includes the colliding object, the remaining motion, and the collision position. This data can be used to determine a custom response to the collision.

float get_angle<>( =, :=, 1 -=, -:1=, ):float

Returns the collision angle according to up_direction, which is Vector2.UP by default. This value is always positive.

Object get_collider<>():Object

Returns the colliding body's attached Object.

int get_collider_id<>():int

Returns the unique instance ID of the colliding body's attached Object. See Object.get_instance_id().

RID get_collider_rid<>():RID

Returns the colliding body's RID used by the PhysicsServer2D.

Object get_collider_shape<>():Object

Returns the colliding body's shape.

int get_collider_shape_index<>():int

Returns the colliding body's shape index. See CollisionObject2D.

Vector2 get_collider_velocity<>():Vector2

Returns the colliding body's velocity.

float get_depth<>():float

Returns the colliding body's length of overlap along the collision normal.

Object get_local_shape<>():Object

Returns the moving object's colliding shape.

Vector2 get_normal<>():Vector2

Returns the colliding body's shape's normal at the point of collision.

Vector2 get_position<>():Vector2

Returns the point of collision in global coordinates.

Vector2 get_remainder<>():Vector2

Returns the moving object's remaining movement vector.

Vector2 get_travel<>():Vector2

Returns the moving object's travel before collision.




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...