Solved - Slowing down when to use mouse on 3d object

Hello everybody…

I’m trying to make a trial game in which I use the mouse to point on a 3d object and it worked well…but as I put the mouse on a 3d object the game begin to slow down in an obvious way and it return to its normal when put the mouse away from it
why that slow down and is there a solution to this
If you need the code, I’ll write it

Thanks in advance

If you’re using picking (i.e. collisions) to detect when your mouse is pointing to 3-D objects, you do have to be careful. Using collisions in conjunction with actual geometry (as opposed to special collision geometry) is indeed very, very slow. It’s OK if you do it only once in a while, but if it’s an integral part of your gameplay, you should probably construct and use collision geometry–spheres and tubes and such–instead of colliding with visible geometry.


That’s a very bad news…unfortunately I’m using non uniformed models that will not match with the collision solid shapes (sphere,tube,…)…but maybe no slow down occurs if I use low poly models
anyway thank you

Using lower poly models will help. Also, using CollisionPolygons instead of visible geometry will help.


Now I find the solution and will put it for futur searchers:

1- the model itseilf in blender may be reduced using Poly Reducer script found in Scripts -> Mesh -> Poly Reducer

2- Export the model in egg exporter in egg format only

3- make the model has CollisionNode other than GeomNode
by opening the egg file in file editor (open with Notepad) and put the code for CollisionNode using this thread

4- Save the model then convert it to bam file using egg2bam

5- Now when using the mouse to detect 3d model put


other than:


to make the detection to the Collision Node not to the geometric node , and will work with a trace or with no slowing down
Thank you drwr for the help[/i]

The poly reducer script, as the ‘decimate’ tool, are powerfull for reducing your mesh’s vertex count but, for Panda, I would suggest using the ‘retopo tool’ instead.

Indeed, it’s taking much more time with retopo but at least you know what the result is and specially you’ll continue using quad instead of triangles.
Also, using retopo allow you to keep your high poly model which you’ll might need later for normal mapping or other stuff…

You’re right…using Poly Reducer too much make the model deformed in an ugly way…but I didn’t hear before about ‘retopo tool’, I’ll search for it on youtube and to do it

Thanks a lot