   fixed object size in perspective projection
  hello, I am trying to implement a move tool manipulator like the one in max or maya, those manipulators newer change their size no matter how far or close we are to them, they always occupie same size at the view port, in order to simulate the stuation, I took the distance from camera to object and generate a scale factor for manipulator but that doesn't work well enought, maya & max and other programs are using a better approach to achive this effect, a formula or something like it, any suggestion for this stuation would be nice, thanx   
  I bet they simply draw it in a fixed distance from the camera.Calculate the distance of the gizmo from the camera, normalize it, then multiply it with the fixed distance.direction = world_gizmo_center-camera_position;direction = FIXED_DISTANCE * normalize(direction);displayed_gizmo_center = camera_position + direction;This depends on your implementation, but I think you get the idea.This should be fine, since gizmos don't have to be depth tested.If you do want objects to be depth tested, then scaling the object seems to be a better idea: but scale it proportional to the square of the distance. (I'm not sure about this one, but you can give it a try).   ;  yea ! thast a realy cool idea, worth give it a try :D thanx[Edited by - afraidofdark on July 9, 2010 6:02:01 AM];  I tried it, but I have to draw it exactly where the object's pivot is (it is implemented in that way) so I only need a scale factor, it also seems to me that max & maya use this method, putting manip at a fixed distance away from camera may show manipulator and object distinct in some conditions   ;  Um... Would you post some code?I don't understand why the constant distance thing isn't working.Did you try scaling with the square of the distance (multiplied with a constant)?   