THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/09/2006 at 23:59, xxxxxxxx wrote:
Cinema 4D Version: 9.102
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
Okay, I realize that this is going to be vague (elaboration can be furnished as we proceed). I have visual rotation controls similar to the standard Rotate tool in Cinema 4D R9. But I probably took a different road to implementation than the developers.
It is understood that the hitpos for the control should be used (obj->GetMg() * res.hitpos) and that this in turn needs to be converted to a tangential vector to determine how mouse movements affect the rotation. I'm using the rotation center->hitpos as the radial vector and the rotation center->rotation axis as the axial vector. Cross-product and get the tangential vector.
Well sort of. The problem is that it is an indiscriminant perpendicular to these two vectors. What is really needed is a tangential vector that represents the positive rotation direction. The perpendicular doesn't work as it always points in the same direction irregardless of rotation direction (clockwise/counter-clockwise) presented by the view.
Any ideas on how to determine the positive tangential or adjust the perpendicular to be coincident with it?