/
2021.1.1124.2 DC Motor.

2021.1.1124.2 DC Motor.



Overview

The DCMotor is a component to simulate an accelerated rotational motion on an axis. It consists of two components; Physical and Logic. Both are needed to control the motor through a logic adapter (connecting the DCMotor to an external controller through a Logic Simulator). Adding a Control Panel gives you the option to control the motor from the Unity scene.

A succesfully created DCMotor shows up with this gizmo.


Where to find

The DC Motor can be found under

Standard Components > Motors > DC Motor > Physical Component

It will automatically be attached to a selected GameObject. Otherwise it will create a new GameObject to attach to.
A WheelJoint will be created automatically as part of the component.

Selecting the newly created GameObject shows you the following menu in the Inspector.

Please note: this is an example of a GameObject with the Physical DCMotor component.


Feature Layout - Physical Component

Live Data

 

Live Data

 

Target Velocity (deg/s)

Displays value of target velocity in degrees per second.

Velocity (deg/s)

Displays current velocity in degrees per second.

Properties

 

Wheel Joint

Sets the Wheel Joint the DCMotor will control.

Maximum Velocity (deg/s)

Sets the maximum allowed velocity of the DCMotor in degrees per second.

Angular Acceleration (deg/s/s)

Sets the maximum allowed acceleration in degrees per second per second.

Control Panel

 

Generate Control Panel

Create a Control Panel for this component.

Feature Layout - Control Panel

Title

The Title of the Control Panel.

Click to ping the target component in the hierarchy.

Double click to edit.

DCMotor Properties

 

Preferred Velocity (deg/s)

Sets the desired velocity at which the DCMotor should spin.

Velocity (deg/s)

Displays current velocity in degrees per second.

Start/Stop

Starts/Stops the motor.

Target Component

 

Target Gameobject

The gameobject which has a standardcomponent you want the Control Panel for.

Target Component

The Component which for which a Control Panel is generated.


How to use

  1. Add a DC Motor Component to a GameObject, in this case a simple cube.

  2. Add a Kinematics Controller, this can be found under Mechanics > Kinematics > Add Kinematics Controller. Make sure the Cube is parented under the Kinematic Controller in the Hierarchy.

     

  3. Add a Control Panel and set the Preferred Velocity

     

  4. Press Play to see the rotation of the cube, controlled by the DC Motor


Related content

2020.1.60.3 DC Motor.
2020.1.60.3 DC Motor.
More like this
2023.1.1294.2 DC Motor
2023.1.1294.2 DC Motor
More like this
2021.1.1560.3 DC Motor.
2021.1.1560.3 DC Motor.
More like this
2023.1.116.1 DC Motor.
2023.1.116.1 DC Motor.
More like this
2022.1.1148.0 DC Motor.
2022.1.1148.0 DC Motor.
More like this
V2020.1.56.3_ DC Motor.
V2020.1.56.3_ DC Motor.
More like this

Prespective Documentation