RigidBody2DTestMotion Method |
Returns true if a collision would result from moving in the given vector. margin increases the size of the shapes involved in the collision detection, and result is an object of type Physics2DTestMotionResult, which contains additional information about the collision (should there be one).
Namespace: Godot
public bool TestMotion( Vector2 motion, bool infiniteInertia = true, float margin = 0.08f, Physics2DTestMotionResult result = null )
[Missing <param name="motion"/> documentation for "M:Godot.RigidBody2D.TestMotion(Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]
[Missing <param name="infiniteInertia"/> documentation for "M:Godot.RigidBody2D.TestMotion(Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]
[Missing <param name="margin"/> documentation for "M:Godot.RigidBody2D.TestMotion(Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]
[Missing <param name="result"/> documentation for "M:Godot.RigidBody2D.TestMotion(Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]
[Missing <returns> documentation for "M:Godot.RigidBody2D.TestMotion(Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]