the symptom, in your words

"A rotated procedural primitive spins about its own origin, not the part pivot"

✓ verified on 26.07.22
lane Getting art inposted

▸ SYMPTOM

  • A primitive authored with a rotation parameter see-saws about its own middle instead of the pivot you intended.
  • A raked hood rises at the rear by as much as its nose falls, so it shows half the intended wedge in each direction rather than one clean rake.
  • A rotated part quietly becomes the widest or tallest feature on the model even though its declared size is smaller.

▸ CAUSE

A rotation parameter such as rot= spins the primitive about its own object origin, wherever the primitive was placed. It does not rotate about the part's intended pivot.

So a box placed at some location and then rotated in place pivots about the box center, not about the point you wanted to hinge on. The rear edge rises exactly as much as the nose falls, which is why the wedge comes out halved and symmetric.

▸ FIX

Move the rotation into the placement step instead of applying it to a box that is already positioned.

  1. Rotate the placement position vector by the desired angle around the pivot.
  2. Place the box at that rotated position.
  3. Bake the same rotation into the box's own orientation.

Use a sign check that generalizes. A slab's local up-ish axis should map to (sin(angle), 0, cos(angle)) for a rotation about Y. Verify a known-good rotated part in the same generator already satisfies that relation before you trust a new one.

Watch the bounds too. A rotated box's own axis-aligned bounding box is trigonometric, cos(|angle|)*length/2 + sin(|angle|)*thickness/2, not the box's declared half-length. A rear-bumper corner return rotated 28 degrees measured noticeably wider than its declared half-width and became the widest point on the whole vehicle.

▸ WHY IT WORKS

The rotation parameter operates in the primitive's own local frame, so it pivots about the origin the primitive sits at. Rotating the placement coordinate first puts that origin where you want the hinge, and baking the same angle into the orientation keeps the part facing correctly. The bounding-box formula follows because a rotated rectangle projects both its length and its thickness onto each axis, so its extent grows with both terms rather than tracking the declared half-length.

Verified on engine 26.07.22: seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?
changelog
  • Published

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord