Loading...
Searching...
No Matches
Public Member Functions |
Public Attributes |
Protected Member Functions |
Events |
List of all members
realvirtual.Drive Class Reference
The drive is moving components including all sub components along the local axis of the game object. More...
Inheritance diagram for realvirtual.Drive:

Public Member Functions | |
delegate void | OnAtPositionEvent (Drive drive) |
Delegate function for the Drive reaching the desitionationPosition. | |
delegate void | OnJumpToLowerLimitEvent (Drive drive) |
void | OnXRStartPlace (GameObject placedobj) |
Event when XR is starting to place the object, Drive is stopped. | |
void | OnXREndPlace (GameObject placedobj) |
Event when XR is ending to place the object, Drive is started again. | |
void | Forward () |
Starts the drive to move forward with the target speed. | |
void | Backward () |
Starts the drive to move forward with the target speed. | |
void | DriveTo (float Target) |
Starts the drive to drive to the given Target with the target speed. | |
void | DriveTo (float Target, float time) |
Starts the drive to drive to the given Target with a custom time - acceleration (or Speed on no Acceleration) will be calculated to reach time. | |
float | GetTimeTo (float Target) |
Calculates the time to the target. | |
void | Accelerate () |
Starts the drive - it will speed up with sinoide if turned on. | |
void | Decelerate () |
void | Stop () |
Stops the drive at the current position. | |
Vector3 | GetLocalDirection () |
Gets the axis vector of the drive. | |
void | StartEditorMoveMode () |
void | SetPositionEditorMoveMode (float editorposition) |
void | EndEditorMoveMode () |
Vector3 | GetStartPos () |
Gets the start position of the drive in local scale. | |
Vector3 | GetStartRot () |
Gets the start position of the drive in local scale. | |
void | AddTransportSurface (TransportSurface trans) |
Adds a Transport Surface to the Drive. | |
void | RemoveTransportSurface (TransportSurface trans) |
Removes a Transport Surface fron the Drive. | |
void | CalculateVectors () |
void | DriveReset () |
![]() | |
void | SetForceStop (bool forcestop) |
Vector3 | DirectionToVector (DIRECTION direction) |
Transfers the direction enumeration to a vector. | |
DIRECTION | VectorToDirection (bool torotatoin, Vector3 vector) |
Transfers a vector to the direction enumeration. | |
float | GetLocalScale (Transform thetransform, DIRECTION direction) |
List< BehaviorInterfaceConnection > | UpdateConnectionInfo () |
List< Signal > | GetConnectedSignals () |
void | SetVisibility (bool visibility) |
Sets the visibility of this object including all subobjects. | |
List< BehaviorInterfaceConnection > | GetConnections () |
List< Signal > | GetSignals () |
GameObject | GetChildByName (string name) |
Gets a child by name. | |
List< GameObject > | GetChildsByName (string name) |
Gets all child by name. | |
GameObject | GetChildByNameAlsoHidden (string name) |
List< GameObject > | GetAllMeshesWithGroup (string group) |
List< GameObject > | GetAllWithGroup (string group) |
List< GameObject > | GetAllWithGroups (List< string > groups) |
List< GameObject > | GetAllMeshesWithGroups (List< string > groups) |
List< string > | GetMyGroups () |
List< GameObject > | GetMeshesWithSameGroups () |
List< GameObject > | GetAllWithSameGroups () |
MeshRenderer | GetMeshRenderer () |
Gets the mesh renderers in the childrens. | |
void | SetCollider (bool enabled) |
sets the collider in all child objects | |
void | ErrorMessage (string message) |
Displays an error message. | |
void | ChangeConnectionMode (bool isconnected) |
void | Log (string message) |
Logs a message. | |
void | Log (string message, object obj) |
Logs a message with a relation to an object. | |
void | Warning (string message, object obj) |
Logs a warinng with a relation to an object. | |
void | Error (string message, object obj) |
Logs an error with a relation to an object. | |
void | Error (string message) |
Logs an error. | |
GameObject | DebugPosition (string debugname, Vector3 position, Quaternion quaternation, float scale) |
Displays a gizmo for debugging positions. | |
void | SetFreezePosition (bool enabled) |
Freezes all child components to the current poosition. | |
virtual void | AwakeAlsoDeactivated () |
Public Attributes | |
DIRECTION | Direction |
The direction in local coordinate system of the GameObject where the drive is attached to. | |
bool | ReverseDirection |
Set to true if Direction needs to be inverted. | |
float | Offset |
Start offset of the drive from zero position in millimeters or degrees. | |
float | StartPosition |
Start Position off the Drive. | |
float | SpeedOverride = 1 |
Factor for locally overriding the speed and acceleration of this drive. | |
float | SpeedScaleTransportSurface |
Scale of the Speed for radial transportsurfaces to feed in mm/s on radius. More... | |
bool | MoveThisRigidBody |
If set to true the RigidBodies are moved (use it if moving) part has attached colliders, if false the transforms are moved. More... | |
bool | EditorMoveMode = false |
List< TransportSurface > | TransportSurfaces |
The transport surface the drive is controlling. Is null if drive is not controlling a transport surface. | |
bool | UseLimits |
float | LowerLimit = 0 |
float | UpperLimit = 1000 |
Lower Drive Limit, Upper and Lower = 0 if this should not be used. | |
bool | JumpToLowerLimitOnUpperLimit = false |
Lower Drive Limit, Upper and Lower = 0 if this should not be used. | |
Sensor | LimitRayCast |
bool | UseAcceleration = false |
If set to true the drive uses the acceleration. | |
bool | SmoothAcceleration = false |
if set to true the drive uses smooth acceleration with a sinoide function | |
float | Acceleration = 100 |
The acceleration in millimeter per second^2. | |
bool | JogForward = false |
A jog bit for jogging forward with the Target Speed. | |
bool | JogBackward = false |
A jog bit for jogging backwards with the Target Speed. | |
float | TargetPosition |
The target position of the Drive. | |
float | TargetSpeed = 100 |
The target speed in millimeter / second of the Drive. | |
bool | TargetStartMove = false |
When changing to true the Drive is starting to move to the TargetPosition. | |
bool | BlockDestination |
If Block Drive is true it will not drive to its Target Positon, Jogging is possible. More... | |
bool | ResetDrive = false |
Resets the Drive to the zero position and stops all movements. | |
bool | _StopDrive = false |
Stops the Drive at the current position. | |
float | CurrentSpeed |
The current speed of the drive. | |
float | CurrentPosition |
The current position of the drive. | |
bool | IsStopped = false |
Is true if Drive is stopped. | |
bool | IsRunning = false |
Is true if Drive is running. | |
bool | IsAtTargetSpeed = false |
Is true if Drive is running. | |
bool | IsAtTarget = false |
Is true if Drive is at target position. | |
bool | IsAtLowerLimit = false |
Is true if Drive is jogging and reaching lower Limit. | |
bool | IsAtUpperLimit = false |
Is true if Drive is jogging and reaching upper Limit. | |
bool | HideGizmos = false |
float | StandardSpeed = 0 |
float | StandardAcceleration = 0 |
bool | UseInteract = false |
bool | IsRotation = false |
bool | PositionOverwrite = false |
true for overwriting position for replaying recordings or multiplayer | |
float | PositionOverwriteValue = 0 |
value for overwriting position for replaying recordings or multiplayer | |
bool | SpeedOverwrite = false |
true for overwriting speed (transportsurfaces) for replaying recordings or multiplayer | |
float | SpeedOverwriteValue = 0 |
![]() | |
string | Name |
The name of the component if it should be different from the GameObject name. | |
ActiveOnly | Active |
GameObject | FromTemplate |
realvirtualController | realvirtualController |
bool | HideNonG44Components |
bool | SceneIsAdditive |
bool | ForceStop = false |
Protected Member Functions | |
override void | OnStart () |
![]() | |
bool | hidename () |
bool | hideactiveonly () |
virtual void | OnStop () |
virtual void | OnStart () |
MU | GetTopOfMu (GameObject obj) |
Gets the top of an MU component (the first MU script going up in the hierarchy) | |
void | InitGame4Automation () |
Initialiates the components and gets the reference to the realvirtualController in the scene. | |
virtual void | AfterAwake () |
void | Awake () |
Events | |
OnAtPositionEvent | OnAtPosition |
OnJumpToLowerLimitEvent | OnJumpToLowerLimit |
Additional Inherited Members | |
![]() | |
enum | ActiveOnly |
![]() | |
static bool | DirectionIsLinear (DIRECTION direction) |
Gets back if the direction is linear or a rotation. | |
Detailed Description
Rotational and linear movements are possible. A drive can be enhanced by DriveBehaviours which are adding special behaviours as well as Input and Output signals to drives.
Member Function Documentation
◆ OnStart()
|
protectedvirtual |
Reimplemented from realvirtual.realvirtualBehavior.
Member Data Documentation
◆ BlockDestination
bool realvirtual.Drive.BlockDestination |
Initial value:
=
true
◆ MoveThisRigidBody
bool realvirtual.Drive.MoveThisRigidBody |
Initial value:
=
false
◆ SpeedScaleTransportSurface
float realvirtual.Drive.SpeedScaleTransportSurface |
Initial value:
=
1