Re: [Vrmlengine-main] compiling issues
Game engine supporting many 3D/2D formats and graphic effects
Brought to you by:
kambi
From: Michalis K. <mic...@gm...> - 2009-01-20 03:28:29
|
da...@la... wrote: > On Tue, 20 Jan 2009, Michalis Kamburelis wrote: > >> da...@la... wrote: >>> it would be very useful if there was a way to move this in the program >>> (insert/delete let you move vertically with gravity turned off) >> Hm, good idea. I added this as Ctrl+Insert, Ctrl+Delete. (At first I >> wondered whether to just redefine insert/delete for this when gravity is >> off, but this doesn't feel good on models where you're often outside the >> bbox of the scene.) >> >> I also added "Avatar height", "current height above the ground" on >> status text in Walk mode, this should be helpful now. >> >> Note that current height above the ground varies compared to "Avatar >> height", due to head bobbing and sometimes due to camera radius >> (colliding of steep stairs). "Avatar height" (this is exactly what was >> set by NavigationInfo.avatarSize[1]) is usually slightly larger than >> "current height" when standing still, as then head bobbing makes you go >> a little down then. >> >> (I think I'll make some extentions to NavigationInfo to control the >> amount of head-bobbing; but I'm getting off-topic..). > > this lets me increase the avatar height, but it won't reduce it below the > default. > Fixed (to some extent). Some background why this happens, and why it will always happen to some extent: There's a safety check when lowering avatar height, it cannot go below something like 1.01 * CameraRadius / (0.5 * (1 - 0.1)) ~ 2 * CameraRadius This is deliberate, to allow avatar height cooperate fine, even with head bobbing and crouching (that's the source of various consts above). This check is necessary, you really do not want to have height < radius (as then avatar would be "floating" on his radius, continously trying to fall on the ground... strange effect, definitely not desired). On the other hand, when no NavigationInfo is specified, the default avatar height was =~ 2 * camera radius. So it happened to be actually the minimum allowed avatar height. What I did was to lower default camera radius calculation by 2, and raise default avatar height by 2, so default avatar height is now roughly the same but you have some space to decrease it. There is still some limit, as camera radius must limit avatar height... And default camera radius cannot be too small (or depth buffer errors start to occur, especially on worse OpenGL drivers). IOW: you can now decrease avatar height at runtime, but there's still some limit, determined from camera radius. Dynamically changing camera radius may be implemented, but later. For now, you can always use NavigationInfo to decrease camera radius (the first number in avatarSize), then you'll be able to decrease avatar height more (at the cost of depth precision at some point). Michalis |