Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

PhysicsWorld.drawAtTransform

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

public bool drawAtTransform;

Description

Draws a body, its shapes and its joints at its assigned Transform's current world pose instead of its simulated physics pose, whenever that body is writing its pose to the Transform. Turning this on costs extra computation for every body drawn, and what gets drawn is no longer a picture of the simulation: shapes can appear to be touching, overlapping, or separated from each other when the simulation itself says otherwise.

Only affects a body whose write mode produces a pose that can differ from the simulated one, PhysicsBody.TransformWriteMode.Interpolate or PhysicsBody.TransformWriteMode.Extrapolate. A body left at PhysicsBody.TransformWriteMode.Current or PhysicsBody.TransformWriteMode.Off keeps drawing from its simulated pose either way. See PhysicsBody.transformWriteMode.