Vector angle between only returning absolute values


#1

Hi

 

I am trying to array some families along a curve to create stadium seating. I have subdivided the curve and created a vector from the seat to the centre point. However when i try to calculate the angle between the vectors, it return the absolute angle. Some of them should be negatives which means when I try to rotate the seat family they don’t point towards the centre. Any suggestions?

 


#2

Hi Paul,

Dynamo 0.91RC has a new "Vector.AngleBetween node that has an extra “rotationAxis” input. If you add some “if” logic, you can get negative values as well:


#3

Hi Dimitar

Thanks for your response. The problem is i’m stuck using v0.8.1. When I get the angle between vectors it only ever return a maximum of 179 degrees. So if I have vector negative Y and I compare it against positive Y, it returns 0 not 180 and always absolute. This means that, as far as I can tell, impossible to calculate if it needs to be positive or negative rotated. Clearly from your image it is fixed in v0.9.1 but and ideas for a workaround for v0.8.1?


#4

here is a good discussion of alternatives -