The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall
The "pivot" of any actor is essentially its "center" - though it may not coincide with the geographical center of the graphics rendered for that actor. Usually static meshes and brushes are more or less centered around their pivot, but this is not necessarily the case. The pivot, when visible, (in the editor) is displayed as a small red cross.
The Movement -> Location property of an actor refers to the location of its pivot. The PrePivot property of an actor is the vector offset of the pivot from its location stored in its mesh, or the center of its sprite – sort of. It is actually the opposite, the vector offset of the mesh/sprite from the pivot. This can be useful if a mesh or sprite snaps to the grid but the part of the mesh/sprite that snaps to the grid is not the part you wanted snapped. Brushes also have a pivot, but the pivot can be moved within the editor, making the PrePivot property less of an issue for Brushes.
The pivot is considered the center point of the actor, and as such is also the point that is rotated around when the actor is rotated. Also the AmbientSound is emitted there.
Setting the pivot
There are several ways to set the pivot point:
- Right-clicking a vertex of a selected brush will put the pivot point of that brush to that vertex.
- Brush Context Menu -> Pivot -> Place pivot snapped here. This will snap the pivot point to the grid where you click on a 2D viewport.
- Brush Context Menu -> Pivot -> Place pivot here. This will place the pivot point exactly where you click on a 2D viewport without considering the grid.
Right clicking a vertex will set it correctly. If you need the pivot point inside the brush and not exactly on a vertex, you can bring up the brush's properties and alter the Display->PrePivot numbers directly. The PrePivot determines the brush's offset from the pivot point.
- If a brush swings off into the distance when rotating, then it's probably because the pivot has somehow been placed far away.
- When rotating a group of brushes together, check that the pivot hasn't ended up off the grid. You can also save time by placing it before rotating.
- If when you try to move the red brush (using shift) and it moves the pivot instead, try to change the red brush properties -> Advanced -> lock location to false.
- In UnrealEd2.0 you PrePivot is not shown in the GUI and therefore not editable. But you can cut the Actor, paste it into an text editor, delete that line with PrePivot, copy that to clipboard and paste it to UnrealEd.
Pivot Points and Movers
It's also the point about which a mover will rotate if there is a difference in orientation between successive keys. In UnrealEngine1 all keys of a mover must have the same pivot point. We don't know if this still holds true for newer engine versions.
- Actor/Display – PrePivot.