:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the PhysicsTestMotionParameters3D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_PhysicsTestMotionParameters3D: PhysicsTestMotionParameters3D ============================= **Inherits:** :ref:`RefCounted` **<** :ref:`Object` Parameters to be sent to a 3D body motion test. Description ----------- This class contains parameters used in :ref:`PhysicsServer3D.body_test_motion`. Properties ---------- +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`bool` | :ref:`collide_separation_ray` | ``false`` | +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Array` | :ref:`exclude_bodies` | ``[]`` | +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Array` | :ref:`exclude_objects` | ``[]`` | +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Transform3D` | :ref:`from` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`float` | :ref:`margin` | ``0.001`` | +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`int` | :ref:`max_collisions` | ``1`` | +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Vector3` | :ref:`motion` | ``Vector3(0, 0, 0)`` | +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ Property Descriptions --------------------- .. _class_PhysicsTestMotionParameters3D_property_collide_separation_ray: - :ref:`bool` **collide_separation_ray** +-----------+-------------------------------------------+ | *Default* | ``false`` | +-----------+-------------------------------------------+ | *Setter* | set_collide_separation_ray_enabled(value) | +-----------+-------------------------------------------+ | *Getter* | is_collide_separation_ray_enabled() | +-----------+-------------------------------------------+ If set to ``true``, shapes of type :ref:`PhysicsServer3D.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 :ref:`PhysicsServer3D.SHAPE_SEPARATION_RAY` are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes. ---- .. _class_PhysicsTestMotionParameters3D_property_exclude_bodies: - :ref:`Array` **exclude_bodies** +-----------+---------------------------+ | *Default* | ``[]`` | +-----------+---------------------------+ | *Setter* | set_exclude_bodies(value) | +-----------+---------------------------+ | *Getter* | get_exclude_bodies() | +-----------+---------------------------+ Optional array of body :ref:`RID` to exclude from collision. ---- .. _class_PhysicsTestMotionParameters3D_property_exclude_objects: - :ref:`Array` **exclude_objects** +-----------+----------------------------+ | *Default* | ``[]`` | +-----------+----------------------------+ | *Setter* | set_exclude_objects(value) | +-----------+----------------------------+ | *Getter* | get_exclude_objects() | +-----------+----------------------------+ Optional array of object unique instance ID to exclude from collision. See :ref:`Object.get_instance_id`. ---- .. _class_PhysicsTestMotionParameters3D_property_from: - :ref:`Transform3D` **from** +-----------+-----------------------------------------------------+ | *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | +-----------+-----------------------------------------------------+ | *Setter* | set_from(value) | +-----------+-----------------------------------------------------+ | *Getter* | get_from() | +-----------+-----------------------------------------------------+ Transform in global space where the motion should start. Usually set to :ref:`Node3D.global_transform` for the current body's transform. ---- .. _class_PhysicsTestMotionParameters3D_property_margin: - :ref:`float` **margin** +-----------+-------------------+ | *Default* | ``0.001`` | +-----------+-------------------+ | *Setter* | set_margin(value) | +-----------+-------------------+ | *Getter* | get_margin() | +-----------+-------------------+ Increases the size of the shapes involved in the collision detection. ---- .. _class_PhysicsTestMotionParameters3D_property_max_collisions: - :ref:`int` **max_collisions** +-----------+---------------------------+ | *Default* | ``1`` | +-----------+---------------------------+ | *Setter* | set_max_collisions(value) | +-----------+---------------------------+ | *Getter* | get_max_collisions() | +-----------+---------------------------+ Maximum number of returned collisions, between ``1`` and ``32``. Always returns the deepest detected collisions. ---- .. _class_PhysicsTestMotionParameters3D_property_motion: - :ref:`Vector3` **motion** +-----------+----------------------+ | *Default* | ``Vector3(0, 0, 0)`` | +-----------+----------------------+ | *Setter* | set_motion(value) | +-----------+----------------------+ | *Getter* | get_motion() | +-----------+----------------------+ Motion vector to define the length and direction of the motion to test. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`