Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

PhysicsWorld.DrawQueryResult

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void DrawQueryResult(CastResult result, Color color, float lifetime, bool drawPoint, bool drawNormal);

Parameters

Parameter Description
result The result to use.
color The color to draw with.
lifetime How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.
drawPoint Whether to draw the point in the result or not.
drawNormal Whether to draw the normal in the result or not.

Description

Draw the CastResult returned from multiple queries. Only a result where Unity.U2D.Physics.PhysicsQuery.CastResult._hit is true is drawn.


Declaration

public void DrawQueryResult(ReadOnlySpan<CastResult> results, Color color, float lifetime, bool drawPoint, bool drawNormal);

Parameters

Parameter Description
results The results to use.
color The color to draw with.
lifetime How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.
drawPoint Whether to draw the point in the result or not.
drawNormal Whether to draw the normal in the result or not.

Description

Draw the CastResult returned from multiple queries. Only a result where Unity.U2D.Physics.PhysicsQuery.CastResult._hit is true is drawn.


Declaration

public void DrawQueryResult(WorldCastResult result, Color color, float lifetime, bool drawPoint, bool drawNormal);

Parameters

Parameter Description
result The result to use.
color The color to draw with.
lifetime How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.
drawPoint Whether to draw the point in the result or not.
drawNormal Whether to draw the normal in the result or not.

Description

Draw the WorldCastResult returned from multiple queries.


Declaration

public void DrawQueryResult(ReadOnlySpan<WorldCastResult> results, Color color, float lifetime, bool drawPoint, bool drawNormal);

Parameters

Parameter Description
results The results to use.
color The color to draw with.
lifetime How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.
drawPoint Whether to draw the point in the result or not.
drawNormal Whether to draw the normal in the result or not.

Description

Draw the WorldCastResult returned from multiple queries.