Re: Smoothly rotating to another angle on pano nodes
Status: Alpha
Brought to you by:
cwalther
|
From: James C. W. <jfc...@ya...> - 2010-01-01 06:21:15
|
Hi Christian, Hmmm...Doing that gradually slows it down till it's moving at a crawl. Eventually it reaches the target location, but it takes a while, and looks weird. I think it's because when th code runs every frame, while it avoids panning miscalualtions, it also makes the return value smaller with each run. --- On Wed, 12/30/09, Christian Walther <cwa...@gm...> wrote: From: Christian Walther <cwa...@gm...> Subject: Re: Smoothly rotating to another angle on pano nodes To: pip...@li... Date: Wednesday, December 30, 2009, 6:47 AM James C. Wilson wrote: > One problem that I've discovered with the > "check if current direction ~ target direction and then angle the camera > to precisly equal the target" is that if I pan myself while the program > is running, the program loses track of where it's going, and hits the 80 > EL pan limit, slowely spinning on the vertical access. Obviously, to > make any of this effective the panorama must be frozen from player > control. But since there's not any way to do that yet, I need to use the > one that won't hit a dead end, and right now that's the version that > checks how many times the function has run...Any suggestions? Instead of calculating the direction incrementally by adding small steps to the current direction, calculate it from scratch in every frame using the starting parameters (recorded when you start the animation) and the elapsed time (from the first argument of the timer function). -Christian ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Pipmak-Users mailing list Pip...@li... news://news.gmane.org/gmane.games.devel.pipmak.user https://lists.sourceforge.net/lists/listinfo/pipmak-users |