Hello,
I'm trying to animate vertex movement. I found out I need to utilize the MasterPointController and add sub controllers to it per vertex (at least that's what I think is the correct way). However I'm struggling to create the subcontrollers. They need to be of SClass_ID: 'ctrlPoint3'. So far I have this:
var newControl = m_Global.Point3Controller;
var sclassId = newControl.SclassId;
var asControlMaybe = newControl as IControl;
var asAnimatableMaybe = newControl as IAnimatable;
var toControllerMaybe = m_Global.PositionController.ToController;
But this isn't working: 'sclasId' is ctrlPoint3, so this is correct, but 'asControlMaybe' and 'asAnimatbleMaybe' are both null and 'toControllerMaybe' crashes with the following error message:
'System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.'
I need to have an IControl though to pass to 'masterPointController.AddSubController(IControl control)'
Is there maybe another way to create Point3controller?
Thanks in advance,
Vin