hello, everyone.
In my programme, when the gravity of b2World is (0, 0), b2Body::SetLinearVelocity() does not works.
The object I invoke SetLinearVelocity() on is always unmovable.And the mass of the object is non-zero.It is a dynamic body.
Why? Help me please.Thanks.
This is log printed from game main loop:
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=10.000000 ---------------------------------->invoke SetLinearVelocity()
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)
In my programme, when the gravity of b2World is (0, 0), b2Body::SetLinearVelocity() does not works.
The object I invoke SetLinearVelocity() on is always unmovable.And the mass of the object is non-zero.It is a dynamic body.
Why? Help me please.Thanks.
This is log printed from game main loop:
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=0.000000
position=(5.000000, 7.500000)
velocity=10.000000 ---------------------------------->invoke SetLinearVelocity()
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)
velocity=10.000000
position=(5.000000, 7.500000)