All pastes #409013 Raw Edit

Untitled

public python v1 · immutable
#409013 ·published 2007-03-25 11:04 UTC
rendered paste body
# I've got two vectors, swarmOb['VEC'] which is the original vector# and bVector which is the new vector.# Now I have to make sure that the angle between those two is no more than BUTTON['MTURN'].val# Check for the maximum turn angleelif  vAngle > BUTTON['MTURN'].val:	Factor = BUTTON['MTURN'].val / vAngle	bLeng = bVector.length	v1 = NormalizeVector(bVector)	v2 = NormalizeVector(swarmOb['VEC'])	bVector = (v1 * Mathutils.RotationMatrix(float(VtoVAngle(v1, v2) - 10), 3, 'r', Mathutils.CrossVecs(v1,v2))) * bLeng