Non-fluent moving caused by picking
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?
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement