Apply incremental rotation to object already rotated


(BigEfrom84) #1

I have a bezier curve, and move along the curve

I have the tangent vector at some point on the curve.
tangent = coord_tangent[‘tangent’]
tangent.normalize()

then i align the object to the curve with the following

rotation = tangent.to_track_quat(‘X’, ‘Z’)
object.rotation_quaternion = rotation
… works fine this far …
tilt = … known

What i am looking for is how to apply an additional rotation to the object to account for the tilt of the curve at that point. I know the tilt angle is based on the tangent vector.