Class PhysicsTestMotionParameters3D
- Namespace
- Godot
- Assembly
- GodotSharp.dll
By changing various properties of this object, such as the motion, you can configure the parameters for BodyTestMotion(Rid, PhysicsTestMotionParameters3D, PhysicsTestMotionResult3D).
public class PhysicsTestMotionParameters3D : RefCounted, IDisposable
- Inheritance
-
PhysicsTestMotionParameters3D
- Implements
- Inherited Members
Constructors
PhysicsTestMotionParameters3D()
public PhysicsTestMotionParameters3D()
Properties
CollideSeparationRay
If set to true
, shapes of type SeparationRay 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 SeparationRay are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes.
public bool CollideSeparationRay { get; set; }
Property Value
ExcludeBodies
Optional array of body Rid to exclude from collision. Use GetRid() to get the Rid associated with a CollisionObject3D-derived node.
public Array<Rid> ExcludeBodies { get; set; }
Property Value
ExcludeObjects
Optional array of object unique instance ID to exclude from collision. See GetInstanceId().
public Array<int> ExcludeObjects { get; set; }
Property Value
From
Transform in global space where the motion should start. Usually set to GlobalTransform for the current body's transform.
public Transform3D From { get; set; }
Property Value
Margin
Increases the size of the shapes involved in the collision detection.
public float Margin { get; set; }
Property Value
MaxCollisions
Maximum number of returned collisions, between 1
and 32
. Always returns the deepest detected collisions.
public int MaxCollisions { get; set; }
Property Value
Motion
Motion vector to define the length and direction of the motion to test.
public Vector3 Motion { get; set; }
Property Value
RecoveryAsCollision
If set to true
, any depenetration from the recovery phase is reported as a collision; this is used e.g. by CharacterBody3D 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.
public bool RecoveryAsCollision { get; set; }
Property Value
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.