Stop moving the ground and move The ball instead. I don't see the reason why you are moving the whole terrain instead of only moving a ball. Making the terrain a static body will make the physics simulation more efficient too.
Static circle rotates when I move kinematic rectangle in Box2d
-
30-06-2023 - |
Pergunta
I am writing 2d scroller with Box2D in Xcode. Scrolling is organized by moving kinematic bodies (which all together make ground). Kinematic bodies are moved with setlinearvelocity
function.
When dynamic body falls on this ground and stops near the wall it starts to rotate. Here is an image:
Black circle is dynamic, blue blocks are movable kinematic bodies. When circle falls in such pit it starts to rotate. If I stop moving blue ground it does not.
How can I change this?
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow