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 PhysicsTestMotionParameters2D
Provides parameters for [method PhysicsServer2D.body_test_motion].
By changing various properties of this object, such as the motion, you can configure the parameters for [method PhysicsServer2D.body_test_motion].
set get bool collide_separation_ray<>():bool set get
If set to true, shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are used to detect collisions and can stop the motion. Can be useful when snapping to the ground.

If set to false, shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes.
set get RID[] exclude_bodies<>():RID[] set get
Optional array of body RID to exclude from collision. Use [method CollisionObject2D.get_rid] to get the RID associated with a CollisionObject2D-derived node.

set get int[] exclude_objects<>():int[] set get
Optional array of object unique instance ID to exclude from collision. See [method Object.get_instance_id].

set get Transform2D from<>():Transform2D set get
Transform in global space where the motion should start. Usually set to [member Node2D.global_transform] for the current body's transform.

set get float margin<>():float set get
Increases the size of the shapes involved in the collision detection.

set get Vector2 motion<>():Vector2 set get
Motion vector to define the length and direction of the motion to test.

set get bool recovery_as_collision<>():bool set get
If set to true, any depenetration from the recovery phase is reported as a collision; this is used e.g. by CharacterBody2D for improving floor detection during floor snapping.

If set to false, only collisions resulting from the motion are reported, which is generally the desired behavior.



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