Property | Type | Description | |
---|---|---|---|
skin | |||
timer | GameObject |
Property | Type | Description | |
---|---|---|---|
ErrorString_ | string | ||
SensorValue | float[] | ||
WWW_ | WWW | ||
assemblyURL_ | string | ||
complete_ | bool | ||
lMotorPowerPrev_ | float | ||
motor | float[] | ||
owner | Field, | ||
rMotorPowerPrev_ | float | ||
retried_ | bool | ||
robotID_ | string | ||
text_ | string | ||
tracker_ | GameObject |
Method | Description | |
---|---|---|
OnGUI ( ) : void | ||
ReloadAssembly ( string url ) : void | ||
Start ( ) : void | ||
Update ( ) : void | ||
physWinFunc ( int windowId ) : void | ||
setMotor ( GameObject motor, float powerLevel, MovementMode applyMode = MovementMode.DIRECT_VERTICAL ) : void |
Assign a given power level to a motor on the virtual robot. This allows components of your robot other than the drivebase to move. This method is designed for moving parts that do not have an actual simulated motor. One example of such a part is a linear slider. This method simulates motor power by directly adding a force to the given component, or GameObject. As a result, you must specify a movement type. This tells the program what direction the component will be moving in and whether the motion is linear or rotational. There are 3 available movement types for linear motion: LINEAR_VERTICAL: Straight up and down. LINEAR_HORIZONTAL: Straight forward and backward. LINEAR_SIDEWAYS: Straight left and right. For compatibility reasons, this method also enables angular motion for arms. However, this method of angular motion is obsolete and the hinge joint version of setMotor should be used instead. For compatibility, the following angulat movement types are allowed:DIRECT_VERTICAL: Rotational, up and down, facing forward (or backward). Perfect for arms. DIRECT_HORIZONTAL: Rotational, side to side. Perfect for claws. DIRECT_SIDEWAYS: Rotational, up and down, facing left or right. All directions are relative to the robot. The default direction is DIRECT_VERTICAL.
|
|
setMotor ( GameObject motor, float velocity, float powerLevel ) : void |
Assign a given power level to a motor on the virtual robot. This allows components of your robot other than the drivebase to move. This version of setMotor is designed for parts that rotate, such as arms and claws. The part must have a HingeJoint component (representing the motor axle) for this method to work. The orientation of the HingeJoint automatically determines the axis of rotation.
|
|
setMotor ( WheelCollider motor, float powerLevel ) : void |
Assign a given power level to a wheel. This allows you to move the robot's drive base. A common use for this method is in driver control, passing in a joystick axis as the power level. This method can only be used on wheel colliders (usually found on drivebases). For a version that applies to other motor placements, see the overloaded version: setMotor(GameObject, float, int).
|
|
setMotors ( WheelCollider motor1, WheelCollider motor2, float powerLevel ) : void |
Set two drive motors to the same power level. Useful for 4-wheel drivebases.
|
Method | Description | |
---|---|---|
LoadAssembly ( ) : Assembly |
Method | Description | |
---|---|---|
updateSensors ( float step ) : void |
public setMotor ( GameObject motor, float powerLevel, MovementMode applyMode = MovementMode.DIRECT_VERTICAL ) : void | ||
motor | GameObject | Which motor to apply this to |
powerLevel | float | The power to supply to this motor |
applyMode | MovementMode | The direction this power should be applied in |
return | void |
public setMotor ( GameObject motor, float velocity, float powerLevel ) : void | ||
motor | GameObject | Which motor to apply this to |
velocity | float | The motor's target velocity |
powerLevel | float | How much power the motor gets |
return | void |
public setMotor ( WheelCollider motor, float powerLevel ) : void | ||
motor | WheelCollider | Which motor to apply this to |
powerLevel | float | The power to supply to this motor |
return | void |
public setMotors ( WheelCollider motor1, WheelCollider motor2, float powerLevel ) : void | ||
motor1 | WheelCollider | The first affected motor |
motor2 | WheelCollider | The second affected motor |
powerLevel | float | The power to supply to both motors |
return | void |