Jump to content

Physics are not working if camera not looking


photo

Recommended Posts

Hi, I have developed a game over game framework. I am using your Car, Level, Driver examples.

 

My car is getting commands from UDP ( wheel, gas, brake etc.)

 

Anyway, If my camera is not looking at my car physics are not working. It gets ignition, gas but it is not moving unless I turn camera to car.

 

Is there anything to fix it? It makes no sense. I should not always look at my car.

 

Before you ask, my code is too huge and complicated to send. But I don't think there is something about my code. There must be a setting maybe rendering setting.

 

Thanks.

Link to comment

Hi,

 

Physics simulation stops when:

1. player is not set,

2. distance to the player is greater than engine.world.getDistance() or engine.physics.getDistance().

 

So I think tuning both world and physics simulation distances should help.

Link to comment

Both physics and world distance is 1 000 000 000 units.

 

What is units? Meters? Centimeters?

 

My distance where physics is not working is at most 300 meters.

Link to comment

Also I think my problem is not distance. I multiply distance by 10000 and nothing changed.

 

If I do not move camera but only look the car that should run physics, physics starts.

 

If I look to ground physics not working but If I look at the car in same distance physics starts to work.

  • Like 1
Link to comment
  • 1 month later...

I forgot to say it is game framework.

 

I can't provide sample, sorry.

 

But if you need any particular part of code I can provide. 

Link to comment
×
×
  • Create New...