Re: [TuxKart-devel] Patch for smooth camera motion...
Status: Alpha
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-07-13 03:01:29
|
co...@ys... wrote: > Here's a patch which makes the camera move much more smoothly. Thanks! > It's not > the right solution, but it is simple and to my eye rather better than > the current effect. Its against 0.0.2 but applies OK against 0.0.3 too. Do you think the 0.2 and 0.1's here should actually be somehow related to the time delta between frames? > ! steady_cam.xyz[0] = steady_cam.xyz[0] + 0.2f*diff.xyz[0]; > ! steady_cam.xyz[1] = steady_cam.xyz[1] + 0.2f*diff.xyz[1]; > ! steady_cam.xyz[2] = steady_cam.xyz[2] + 0.2f*diff.xyz[2]; > ! steady_cam.hpr[0] = steady_cam.hpr[0] + 0.1f*diff.hpr[0]; > ! steady_cam.hpr[1] = steady_cam.hpr[1] + 0.1f*diff.hpr[1]; > ! steady_cam.hpr[2] = steady_cam.hpr[2] + 0.1f*diff.hpr[2]; It seems like this would look different on a high frame rate machine than on a low rate system. I'll experiment. > I guess the right solution is to give the camera its own physics model > and collision detection with walls. Yes - I agree...someday. :-) -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |