Checking For Input
I have a small engine Im working on that uses Direct Input, and I was woundering how many time a sec I need to check for input.
The reason I ask is I have it check every .1 seconds, and if a key is pressed it rotates a cube .5 degrees. When I run it, it works fine but looks "jumpy" when it moves. Any help would be apriciated.
hi, the way i do it is to check for input every frame so the faster the machine you work on, the more ofthen you check your input. maybe i am totally wrong here, but just trying to help you
checking every frame for input looked the easiest and most logic thing to do. or do you mean your framerate is too low and wanna check for input more then once per frame?

cb_schear : Your problem is not woth input but with timing. Insted you rotate cube for fixed angle, rotate it for something like
angle = rotation_speed * time_elapsed_from_last_frame;
(search this forum for timer(s) or simmilar.. this has been anwserd many times)
There are more worlds than the one that you hold in your hand...
angle = rotation_speed * time_elapsed_from_last_frame;
(search this forum for timer(s) or simmilar.. this has been anwserd many times)
There are more worlds than the one that you hold in your hand...
You should never let your fears become the boundaries of your dreams.
Cross post (thanks, IndirectX). Thread closed.
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions ]
Thanks to Kylotan for the idea!
[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions ]
Thanks to Kylotan for the idea!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement