---
title: "snapTo"
canonical: "https://help.vicon.com/space/ShogunPost121/1253737795/snapTo"
format: markdown
---
# Description

Snaps the primary node to the average (translation and rotation) of the other selected nodes.

Use snapTo when you need to position or orient an object based on the position and/or rotation of one or more other objects, whether at a single frame in the timeline, over a specific subset of the timeline, or over the entire animation range.

## Functional area

Snap

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `snapTo [-allTime] [-ranges] [-positionOnly] [-rotationOnly] [-system]` |

### Arguments

None

### Flags

> Macro (scroll-tablelayout)

| Name | Flag arguments | Argument type | Exclusive to | Comments |
| --- | --- | --- | --- | --- |
| `all time` | 0 | — | ranges | Performs the snap over the entire animation range. |
| `ranges` | 0 | — | allTime | Performs the snap over all selected time ranges. |
| `positionOnly` | 0 | — | rotationOnly | Only modifies the translation of the primary node. |
| `rotationOnly` | 0 | — | positionOnly | Only modifies the rotation of the primary node. |
| `system` | 0 | — | positionOnly | Works similarly to [snapToSystem](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737770) command, but it doesn't position the markers according to the system, it only orients them to it. (Must be at least 4 markers selected for this option). |

## Return value

void

## Examples

```plaintext
// This sequence of commands creates a marker called "rootTemp" 
// and snap its position over all time to the average of the four
// indicated waist markers. 
create Marker rootTemp;
select LFWT LBWT RFWT RBWT rootTemp;
snapTo -allTime;
```

# Additional information

## Related commands

- [copyPattern](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737617)
- [snapToConstraint](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736474)
- [snapToLine](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736528)
- [snapToLocal](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736854)
- [snapToRigid](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737073)
- [snapToSystem](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737770)
- [snapToSystemAlign](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737280)