5
$\begingroup$

Suppose I have an object, that I move from A to B (by pressing the G button) on the XY plane. I want to automatically orient it, so it always faces the direction of the movement. Furthermore, I want it to rotate as if it is a wheel.

Given a linear motion, I want to set the orientation with drivers, so the Y points forward and Z points upward.

As there are no keyframes available, the function that updates the direction and the rotation of the "wheel" must be invoked regularly to capture the current and the previous positions and make the needed updates.

Initial scene: Initial scene

The wheel has been dragged/is being dragged: The wheel has been dragged/is being dragged

Can it be achieved ONLY with drivers?

$\endgroup$
9
  • 2
    $\begingroup$ Deducting the orientation just from the starting orientation and the positional offset is not possible. You would have to have a function describing the motion or approximate it in small steps. Or do you only want this for a single axis (X), like your equation suggests. $\endgroup$
    – Leander
    Commented Dec 21, 2019 at 10:59
  • $\begingroup$ @Leander yes, only around one axis (sphere's local X axis). For that the sphere must also automatically align its Y axis with the direction of the movement. The problem is calculating the positional offset in a driver. $\endgroup$
    – user57276
    Commented Dec 21, 2019 at 11:14
  • $\begingroup$ I have edited your question, because in this case "drag around the XY-Plane" would be incorrect. Please correct it if i misunderstood $\endgroup$
    – Leander
    Commented Dec 21, 2019 at 11:18
  • $\begingroup$ @Leander you have probably misunderstood it. The sphere is moved in a plane and reorients itself to face the direction of the movement, so that it can be rotated around its X axis like it is rolling. $\endgroup$
    – user57276
    Commented Dec 21, 2019 at 11:25
  • 1
    $\begingroup$ This is a hack to store the previous position. (Edit) Whops, the dependency graph rework from 2.8 broke it. $\endgroup$
    – Leander
    Commented Dec 21, 2019 at 13:50

0

You must log in to answer this question.