Jump to content
  • Advertisement
Sign in to follow this  
Revelation60

Non-fluent moving caused by picking

This topic is 4220 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, In my application I use picking when the mouse moves, because when the mouse gets over certain objects, their color must change. Now, the problem is that an object is moving from one side of the screen to the other, but when I move my mouse fast, I can see that the object is 'hopping', by which I mean that it doesn't move fluently. The cause of this is that the scene doesn't get rendered too often, because it is in picking mode. How can I fix this?

Share this post


Link to post
Share on other sites
Advertisement
How are you doing the picking (are you using the selection buffer, ray casting, etc)? How many polygons in the scene? Are you doing any sort of testing to quickly discard objects which can not possibly be under the mouse? More info needed please.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I think he is trying to say that: when the mouse is rapidly swiped from one side of the screen to the other; he detects a pick-hit on each end, but not on any of the intermediate positions.


This is because you moved the mouse so fast, that it only registered as being on either side.
While your physical mouse feels analog, the cursor position updates in your program are actually discrete.

So those picks in the middle got missed, because the mouse really Wasnt there!


The only thing I can really suggest is:
Compare previous and current cursor locations; if they are Too far apart then interpolate intermediate cursor locations and test those in order for your picking. Of course, even if you do that and properly catch all the intermediate hits; there is still the problem of what if your framerate cant actually draw them all.. i guess you could for rendering purposes, hilight All those picks that occured on the same frame at the same time.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!