# Description

Category: Python

This bug deals with the alignAxisToVect(vect, axis, factor)'s third input. A simple blend is uploaded with an example. This is in 2.49a

I'm not exactly sure how to describe what happens, it would be better if you download the blend and see what happens.

When the angle between the specified axis of the object and the desired vector is greater than 90 degrees the factor's value seems to rotate the object inversely.

Basically, what should happen, is that the greater the angle, the greater the amount of rotation that should be represented for a given factor. Instead, the bug makes the amount of rotation decrease as the angle gets larger than 90 degrees.

Did that make sense? If not, the blend should make the problem clear.

# Details

Type
Bug

### Event Timeline

That looks more like a near-gimbal-lock condition (it's almost a flip) than an error in the interpolation code, yes it may be undesired behavior, but matrix interpolation behaves like that. Ideally we should use quaternion interpolation to prevent that kind of problems, though I don't know enough about quaternions to implement it. :/

The problem is in the interpolation code. It's linearly approximating the original coordinates to the desirable one. In extreme cases such as 180 deg. it will produce the effect of starting slow, go fast and to end slow. This is because it's not "rotating" the vector.

We are doing similar to the code here:
http://www.blitzbasic.com/Community/posts.php?topic=28397#298675
This is faster, but it's not the angular alignment you were expecting.

So, is this a bug then?

Sorry for taking so long.

It's a bug as far as not doing what the documentation says it will do:
"factor (float) – Only rotate a feaction(sic) of the distance to the target vector (0.0 - 1.0)"

Bug is probably not the best word though, its just an artifact of the simplified logic chosen to carry out the operation.

Aaron Carlisle (Blendify) closed this task as Archived.Sep 30 2018, 6:29 PM
Aaron Carlisle (Blendify) claimed this task.