Physics problem/error?

Hey,

I have some trouble with the physics engine, there is some inaccuracy…

I have a bullet in the scene which has a constant speed, when I shoot it at some objects, sometimes it passes through them even tough these object have physics as well and shouldn’t happend that.

Is there any way I can stop this? It’s because of the speed? Is there any work around to prevent it from happening?

Thanks [import]uid: 89239 topic_id: 19185 reply_id: 319185[/import]

You can fix this by adjusting the physics settings:
[lua]-- Number of velocity itterations per frame
– 3 is default try 8 or 10
physics.setVelocityIterations( 8 )

– change position iterations from default value of 8
– Position approximations per frame for each object. Increasing this
– number will cause fewer momentary inaccuracies
physics.setPositionIterations( 16 ) [/lua]

-David [import]uid: 96411 topic_id: 19185 reply_id: 74009[/import]

Thank you David!

This will also affect my game performances? [import]uid: 89239 topic_id: 19185 reply_id: 74152[/import]

I tried this and the bullet still passes through the wall…If I decrease the speed is alright but this is not an option because the game won’t play as I want to… [import]uid: 89239 topic_id: 19185 reply_id: 74153[/import]