This is what I have so far. I'm attempting to ignore the rotation of the orb to keep the platform level while it moves around.
I'll also need to get the positions to change so that the surface doesn't morph to make it work completely.
Right now the former challenge is incorrectly met and the latter has yet to be attempted.
edit -- removed code --
As it turns out, the solution is unbounded.
We can get the euler rotation of our spheres, but the z axis is zero'd. When the rotation vector of the sphere passes through the y axis (up and down in game), the x axis rotation adjusts to compensate while the y axis rotation is set to an x/z plane quadrant-dependent value.
We want to calculate player rotation to adjust the orb since it originates from the player's staff, but cannot do so since using trigonometry to work back using the orbs rotation towards a player look at position, the distance to that position, and the distance to the player doesn't work due to being unable to determine how many times the orb's rotation vector has passed through the y axis.
A good solution would be to have an orb.getPlayerRotationEuler() function but there is none that I know of. Granted, I haven't tried eval stuff yet, but as I understand it that is essentially permitted hacking and therefore isn't allowed in competitive play.
Hi, I do a lot of stuff with trigonometry and rotations too. What do you mean when you say when the rotation vector passes through the y axis? Are you saying when the orb tilts up or down?
If these are the axis in the world,
then every time the orb rotates through the y axis -- that is, every time it turns up or down until it flips over.
You can ignore it. One guy can usually write my essay for me fast and I have enough time to think. Although you can also use this help, if you want I can give you his contacts. Smart guy