You can multiply (* operator) two quaternions to combine them. The order does matter here, though I can’t remember what side is what, but experimenting a bit should get you the results you want.
Appreciate the response. That’s what I am struggling with: the order. Wondering if anyone can push me in the right direction. Can’t seem to find the proper order for the final rotation. I’ve tried many combos already and was wondering if I’m going about this wrong.
This script places the object at a rays hit.point. Then lines it up properly with the rays normal. I add an additional rotation based on an angle to point the object in a certain direction. It all works.
I am looking for a final quaternion that combines those double rotations so I can smoothly rotate the initial rotation to the final rotation.
Would also avoid doing super long sequences of calculations like that. Do one at a time; step by step, giving each local variable a descriptive name to help you understand what everything done.