Roland Posted June 15, 2012 Share Posted June 15, 2012 This is the information given about update of a controller void UpdateController( TController controller, flt angle, flt move, flt strafe=0, flt jump=0, flt maxacceleration=0.5f, int iterations=1, int crouchmode=0 ) Updates the controller direction, movement and jump state. The iterations parameter controls how many times collision is calculated. Using several iterations can make motion appear smoother when a camera is attached to the controller. However, an iterations value of one is enough for controllers that do not control the view. Question How does the parameter 'move' relate to the actual movement in the game. What does a value of 'move=1' mean? What does 'max acceleration=1' mean? Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
DaDonik Posted June 15, 2012 Share Posted June 15, 2012 I can't give you precise information about "move" and "acceleration", but i can say that those values are not frame rate independent. Means you still need to multiply the passed value by Appspeed() to get it right. What i use is a macro for ((1.0f / 60.0f) * Appspeed()), which allows me to use meters per seconds everywhere. Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
Roland Posted June 15, 2012 Author Share Posted June 15, 2012 Ok DaDonik, sounds usable. I assume your monitors refresh rate is 60 with Flip(1). Mine is 120 so that would be (1/120)*AppSpeed() then. Will test that when I come home from work. Thanks Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
DaDonik Posted June 15, 2012 Share Posted June 15, 2012 It's actually based on the physics update rate, which is 60. But you are right, if i move sth without physics i would get in trouble =) Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
Roland Posted June 15, 2012 Author Share Posted June 15, 2012 Silly question. Is it possible to get the physics update rate somewhere or is it always 60 on all machines? Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
DaDonik Posted June 15, 2012 Share Posted June 15, 2012 Check this page: http://www.leadwerks.com/wiki/index.php?title=UpdatePhysicsCallback It made me assume that the physics engine is constantly updated at 60hz, if i do it like: UpdateWorld(AppSpeed()); Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
Roland Posted June 15, 2012 Author Share Posted June 15, 2012 Aaah... Cool. Thanks Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Pixel Perfect Posted June 30, 2012 Share Posted June 30, 2012 Just a heads up. I have never found you need to modulate the velocity parameter to UpdateController with AppSpeed(). All my previous testing showed that any given constant value remains correct as you increase or decrease the framerate. This is about the only place I don't use it! Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.