Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Models Flickering and Moving rapidly while dragging  (Read 836 times)
harikumar001
Customers
Community Member
*****
Posts: 65


« on: July 21, 2010, 04:46:34 AM »

Hi all,

Have a fine day.

Ran into a new problem today  Sad. Was working with models drag and drop in a 3d room. I do the following steps to achieve drag and drop:

1. Select the model based on mouse click against a mesh
2. Once selected and dragged the model follows the mouse pointer
I use projecting techniques to convert 2d mouse to 3d world position
3. When released, the object is placed at the mouse position

Earlier I used some of the models that came with the  TV3D tutorials for testing. They were working fine. Now I downloaded some other furniture models from the internet for testing, but I find some problems with the drag and drop functionality.

The new furniture models load fine and are displayed correctly. But when I start dragging they start to flicker and move around the mouse point very rapidly. Look like they are jiggling very fast. I also see changes in the texture of the furniture models. They become dark sometimes and quickly become light as the models move. All these problems while dragging only and only with the new furniture models. Any idea why this is happening??

The size of the model is 259KB and texture file is 42KB.

Any help will be greatly appreciated.

Thanks & Regards
Logged
Mithrandir
Community Member
*
Posts: 325


« Reply #1 on: July 21, 2010, 10:45:18 AM »

Maybe the models are broken or have some strange geometry that causes them to flicker. Z-Buffer usually causes some flickering when two faces are close together. Try moving the camera instead of the model to see what happens and eventually change near/far plane.

Also try models from different sources.
Logged
harikumar001
Customers
Community Member
*****
Posts: 65


« Reply #2 on: July 22, 2010, 04:47:09 AM »

Thank you mithrandir but the problem was that I was careless in my coding.

I was following one of the tutorials and had .SetSphereMapping enabled unknowingly which was causing the texture change problems.

Regarding the vigorous movement I figured out it has something to do with Mouse Picking a mesh. Things are better when I used AccurateTesting instead of BoundingBox testing.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks