I'm about to write one of those Translation/Rotation/Scale handles, but honestly i don't know the math behind those GUI thingys.
The thing that i couldn't figure out is how do they appear with a constant size on screen? On the top of my head i would projected the target object position on a plane that is somewhere between the near and the far plane, and draw the gizmo at that point, but that won't work well with the perspective projection(EDIT: or will it?).
Another thing is to project the target object position(objPos) on the screen, and additionally project these points
objPos + (1,0,0); objPos + (0,1,0); objPos + (0,0,1) and determin how X,Y,Z change in screen space and then draw the gizmo in 2D.
Do you guys know a trick on how to implement this esier?
imoogiBGMember Since 16 Jan 2011
Offline Last Active Today, 03:01 PM
- Group Members
- Active Posts 393
- Profile Views 8,214
- Submitted Links 0
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown