trick for constrained motion