At the outset I warn that I don't know if absolute movement is the correct term.
What I want to show with the image below, is that it moves in 2 axes. So I want to know how to add these 2 variations of the movements of X and Y:
The image above shows a very simplified movement. What I'm doing in Blender is more like an F1 car going around a circuit.
I own a car and would like the wheels to rotate based on the amount of motion the chassis goes through.
As you may already know, depending on which direction the car is going, this defines whether the rotation will be clockwise or counterclockwise.
To get around this, I used an if, which will make the rotation movement always in one direction.
Expression (driver x rotation of wheel):
angle+pi/10 if varX*varY > 0 else angle+pi/10
- angle = rotation on the x axis of the wheel itself being affected.
- varX = x location of car (parent)
- varY = y location of car (parent)
That's not my problem, it happens that this car travels a path, and it doesn't do it all at a constant speed, but the wheels always rotate at the same speed (because in the sum, I used a constant value).
I would like to know how to calculate the total movement, of X and Y, to use it in the rotation of the wheels.
As I'm not an English speaker I don't look for the exact term, but I believe there is a way to calculate this displacement, so that I can multiply the value of this displacement in my expression.
(angle+pi/10)*totalMovement
I tried to add a driver linked to the offset of the path, but it didn't work, I think maybe it has nothing to do with one thing with the other. I can't do this using the X and Y variations, because they give a very large value and that apparently doesn't make sense (I multiplied varX by varY).