Lisias
Space Traveller Wanna-be
Hi.
I'm stuck with this problem.
I have a vessel like this:
The red strip is the MFD screen, and the pink strip is the PWR/SEL/MNU buttons, and are defined in a separated mesh. They are visible only on Virtual Cockipit.
The "cockpit" animates using MGROUP_ROTATE, CreateAnimation and AddAnimationComponent into this:
Everything works fine but the MFD Buttons. By trial and error, I found that if I animate the mesh just a bit, the empty area where the button used to be are still clickable.
So I conclude that the oapiVCRegisterArea, oapiVCSetAreaClickmode_Quadrilateral and oapiVCSetAreaClickmode_Spherical API functions use vessel coordinates, not "local mesh ones".
I use a intermediary function that takes a MESHGROUP and calculates the coordinates from it - so I don't have to bother calculating positions, the function calculate the quadrilateral directly from the vertices. [I forgot to add this info while posting]
Calling again oapiVCSetAreaClickmode_Quadrilateral after animation don't help. This function appears to be locked on the original mesh position, not the transformed new position.
How I can tell Orbiter the new VC mesh coordinates in order to get clickable buttons on all stages of the animation (and not only on the original, mesh load time, one?)
I'm stuck with this problem.
I have a vessel like this:
The red strip is the MFD screen, and the pink strip is the PWR/SEL/MNU buttons, and are defined in a separated mesh. They are visible only on Virtual Cockipit.
The "cockpit" animates using MGROUP_ROTATE, CreateAnimation and AddAnimationComponent into this:
Everything works fine but the MFD Buttons. By trial and error, I found that if I animate the mesh just a bit, the empty area where the button used to be are still clickable.
So I conclude that the oapiVCRegisterArea, oapiVCSetAreaClickmode_Quadrilateral and oapiVCSetAreaClickmode_Spherical API functions use vessel coordinates, not "local mesh ones".
I use a intermediary function that takes a MESHGROUP and calculates the coordinates from it - so I don't have to bother calculating positions, the function calculate the quadrilateral directly from the vertices. [I forgot to add this info while posting]
Calling again oapiVCSetAreaClickmode_Quadrilateral after animation don't help. This function appears to be locked on the original mesh position, not the transformed new position.
How I can tell Orbiter the new VC mesh coordinates in order to get clickable buttons on all stages of the animation (and not only on the original, mesh load time, one?)
Last edited: