Collision Detection
realvirtual checks moving geometry for collisions while the simulation runs. Every scene node can carry a Collision Role, including static ones such as a fence, a machine frame or a fixture. Everything below that node counts as one collision body. Bodies with different roles are checked against each other whenever one of them moves; bodies with the same role never collide.
The check is exact: after a fast bounding-box pre-filter, the actual mesh triangles are tested against each other. A robot arm passing diagonally close to a fixture does not raise a false alarm.
Touching is not a collision. Only real penetration counts. A box riding flush on a conveyor, a part resting on a table or two parts set face to face raise nothing. Contact within 0.01 mm also counts as touching. The tolerance grows slightly for parts far from the origin, so large layouts do not flicker.
When two bodies intersect, both get a pulsing orange outline, the same alarm silhouette used by machine messages. A collision card appears in the messages panel on the right. The simulation keeps running: this is a notice, not a safety stop.

Select the role from a single dropdown on the node. There are no group lists or exclusion matrix:
| Role | Meaning |
|---|---|
| None | Default. The node takes no part in collision checking. |
| Tool | Grippers, welding guns, end effectors |
| Workpiece | Parts being produced or handled |
| Machine | Machine frames, fixtures, stations |
| Robot | Robot arms and other kinematics |
| Environment | Floors, fences, walls, surroundings |
| Cutter | A milling or cutting tool. Its separate role lets collision checking include contact with a tool changer’s gripper (Tool) that holds it. Two nodes with the same role never collide with each other |
Two rules follow from the role:
- Same role never collides. All links of a robot share the
Robotrole and are treated as one body. - Nested bodies are never checked against each other. A gripper (
Tool) mounted on a robot (Robot) touches its own flange by construction, so this pair is skipped. The gripper is still checked against machines, workpieces and the environment.
The role covers the node’s whole subtree, down to the next descendant carrying a role of its own. For example, the robot’s role extends up to the gripper.
Collision cards
Section titled “Collision cards”Every collision pair gets its own card in the messages panel, next to the machine messages:
- The card latches. It stays visible after the parts separate again, so a brief brush during a fast motion is never missed.
- Click the card to frame the camera on the collided objects and flash them in the warning color.
- OK acknowledges this specific collision. If the parts still intersect, the next simulation tick detects it again. OK only closes it permanently once contact ends.
- Ignore mutes this collision type (the role pair, e.g. Tool ↔ Workpiece) for the rest of the current run. Use it for contacts that are part of the process, like a gripper closing on a workpiece. Ignores are dropped when the next model is loaded.
The standard demo scene has pre-assigned roles, so you can observe collision checking immediately. These are robot (Robot), gripper (Tool), CNC door (Machine) and spawned workpieces (Workpiece).
Setting it up
Section titled “Setting it up”- Open the Inspector on the node you want to monitor, for example the robot root
- Add the Collision Role component and pick a role, e.g. Robot
- Assign roles to the counterparts, e.g. Machine on the fixture, Environment on the fence. Static parts work the same as moving ones
- Start the simulation. A collision outlines both bodies and adds a collision card
Floors and load-bearing parts can keep a role: parts resting on them only touch them. Use None where a contact is a deliberate part of the process and you do not want it checked at all.
The role is stored in the model’s rv_extras and survives saving, sharing and reloading the GLB. No Unity export step is required.
Spawned workpieces
Section titled “Spawned workpieces”Parts created at runtime by a Source cannot carry their own role. Instead, set Collision Role For MUs on the Source. Every spawned part joins collision checking with that role and leaves it when a Sink removes it. Spawned parts are checked with their exact triangles, also when many of them share one instanced template.
PLC signals
Section titled “PLC signals”The collision state is mirrored into the signal store, so a PLC can react to it in Live mode:
| Signal | Type | Direction | Meaning |
|---|---|---|---|
| CollisionActive | bool | read | true while at least one collision is reported |
| CollisionCount | int | read | number of reported collision pairs |
| ResetCollisions | bool | write | rising edge clears all reported collisions and re-arms the check |
Pairs that only overlap in the start pose (see below) count towards neither signal.
The three signals exist in models that use collision checking — at least one node with a collision role, or a Source with a Collision Role For MUs. A model without either does not load the collision check at all, so it has none of these signals.
AI assistants and the Problems panel
Section titled “AI assistants and the Problems panel”A reported collision is also visible outside the 3D view, so an AI assistant connected over the AI bridge notices it without being asked to check:
| Where | What appears |
|---|---|
web_status | A block collisions with the number of reported pairs and, for up to ten of them, both parts with their roles. Without a collision it reads "collisions": { "active": 0 } |
| Problems panel | One warning per reported pair, Collision: part (role) with part (role). A click selects the first part. The entry disappears when the pair is cleared |
Log (web_logs) | One warning Collision detected: … with … at the moment a pair is reported, in the category sensor |
An assistant reads the details with the command collision.status and clears the reported collisions with collision.reset, the same as the ResetCollisions signal or acknowledging the cards.
Overlaps in the start pose
Section titled “Overlaps in the start pose”Parts that already overlap when the check starts are not reported as collisions:
- A pair that overlaps at the start stays quiet until it has been apart once. The next contact after that is a normal collision with a card. The start is the first simulation tick after loading the model and every simulation reset.
- Two parts that cannot move and overlap, for example a fence placed slightly into a floor, never raise an alarm.
Both kinds are listed once per model load as information in the Problems panel. The panel does not open by itself:
- Collision: parts overlap in the authored layout lists the still pairs.
- Collision: parts touch in the start pose lists the pairs that are quiet until they separate.
Use these entries to fix the layout, or to confirm that the overlap is intended.
Behavior details
Section titled “Behavior details”- Checking runs only while the simulation is playing. Nothing is evaluated while editing or paused.
- Only parts that moved since the last tick are re-checked, so a still scene costs almost nothing.
- Only visible geometry takes part. Hidden nodes and hidden templates never raise alarms. Parts hidden by a visibility signal drop out at once. A single part that you hide by hand while the simulation is running (in the hierarchy or the Inspector) can still be checked until the model is loaded again.
- Geometry that is deformed or rewritten at runtime (energy chains, flexible bands) is excluded from triangle checking; a single console warning per model load reports it.
- A machining workpiece is checked with its own mesh until machining starts, and whenever machining is not available. While it is being machined, its full stock box stands in for it.
- The check runs once per simulation tick (60 Hz by default, see the simulation step in the viewer settings). A thin part that moves through another part completely between two ticks is not detected. Slow the motion down or make the parts thicker where this matters.
- Faces that only touch never count. Because of that, two parts whose side faces lie exactly in the same planes can overlap without being reported — for example two boxes of the same size pushed into each other end-on, with their top, bottom and side faces flush. A small difference in size or position is enough for the overlap to be detected.