pass through by fast moving objects with lines

Hej,

I know that lines are not the best/right way to deal with physics, but I need it for my game.

Having said that, I tried a lot to have objects not pass through walls.

I tried to increase physics.setPositionIterations() and physics.setVelocityIterations() up to 1024 with no luck.

The dynamic objects are .isBullet = true.

My current settings which work best so far are: 

    physics.setMKS(“velocityThreshold”, 0.01)

    physics.setMKS(“timeToSleep”, 0.1)

    physics.setMKS(“linearSleepTolerance”, 0)

    physics.setMKS(“angularSleepTolerance”, 0)

    physics.setScale( 30 )

    physics.setTimeStep( -1 )

Still I am wondering whether I could set a different width of the physics collision line of the line object, as it appears it is always just 1pixel wide regardless of the width of the line.

Thanks a lot for the help.

Cheers,

Phil

Why can’t you use rectangles instead of lines?  That way you can have a thicker object.

Rob

Hej Rob,

good to hear from you.

Mainly because I have a user input to draw lines and I haven’t figured out a way to replace them with proper rectangles.

Seems like a lot of extra work for such a simple thing.

Cheers,

Phil

Why can’t you use rectangles instead of lines?  That way you can have a thicker object.

Rob

Hej Rob,

good to hear from you.

Mainly because I have a user input to draw lines and I haven’t figured out a way to replace them with proper rectangles.

Seems like a lot of extra work for such a simple thing.

Cheers,

Phil