Physics2DServerBodyTestMotion Method |
Returns true if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. Physics2DTestMotionResult can be passed to return additional information in.
Namespace: Godot
public static bool BodyTestMotion( RID body, Transform2D from, Vector2 motion, bool infiniteInertia, float margin = 0.08f, Physics2DTestMotionResult result = null )
[Missing <param name="body"/> documentation for "M:Godot.Physics2DServer.BodyTestMotion(Godot.RID,Godot.Transform2D,Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]
[Missing <param name="from"/> documentation for "M:Godot.Physics2DServer.BodyTestMotion(Godot.RID,Godot.Transform2D,Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]
[Missing <param name="motion"/> documentation for "M:Godot.Physics2DServer.BodyTestMotion(Godot.RID,Godot.Transform2D,Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]
[Missing <param name="infiniteInertia"/> documentation for "M:Godot.Physics2DServer.BodyTestMotion(Godot.RID,Godot.Transform2D,Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]
[Missing <param name="margin"/> documentation for "M:Godot.Physics2DServer.BodyTestMotion(Godot.RID,Godot.Transform2D,Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]
[Missing <param name="result"/> documentation for "M:Godot.Physics2DServer.BodyTestMotion(Godot.RID,Godot.Transform2D,Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]
[Missing <returns> documentation for "M:Godot.Physics2DServer.BodyTestMotion(Godot.RID,Godot.Transform2D,Godot.Vector2,System.Boolean,System.Single,Godot.Physics2DTestMotionResult)"]