# motionMode

> Specifies how to generate motion vectors in this draw range.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine.Rendering](/engine/6000.7/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public MotionVectorGenerationMode motionMode { get; set; }
```

### Remarks

This corresponds to [Renderer.motionVectorGenerationMode](/engine/6000.7/script-reference/unityengine/renderer/motionvectorgenerationmode.md).

* If you set this to [MotionVectorGenerationMode.Camera](/engine/6000.7/script-reference/unityengine/motionvectorgenerationmode/camera.md), Unity doesn't render the draw commands in per-object motion vector passes, regardless of each draw command's [BatchDrawCommand.flags](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommand/flags.md).
* If you set this to [MotionVectorGenerationMode.Object](/engine/6000.7/script-reference/unityengine/motionvectorgenerationmode/object.md), Unity renders the draw commands in per-object motion vector passes if the draw command has [BatchDrawCommandFlags.HasMotion](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandflags/hasmotion.md) set.
* If you set this to [MotionVectorGenerationMode.ForceNoMotion](/engine/6000.7/script-reference/unityengine/motionvectorgenerationmode/forcenomotion.md), Unity renders the draw commands in per-object motion vector passes if the draw command has [BatchDrawCommandFlags.HasMotion](/engine/6000.7/script-reference/unityengine/rendering/batchdrawcommandflags/hasmotion.md) set, and it should output a zero motion vector. This behavior relies on the used shader being implemented correctly.
