Open freQuensy23-coder opened 1 year ago
The GRAVITY
attribute can be set like so:
class FirstScene(SpaceScene):
GRAVITY = (0, 0)
def construct(self):
c1 = Circle(color="red").shift(2 * LEFT)
c2 = Circle(color="blue").shift(RIGHT)
self.make_rigid_body(c1, c2)
c1.body.velocity = (1, 0)
self.wait(10)
It does not help. When you run your code, you get this result video
Interesting, I can't reproduce this. Can you provide your manim version and OS information? Just for clarity: can you confirm you've done the following steps:
from manim import *
from manim_physics import *
class FirstScene(SpaceScene): GRAVITY = (0, 0)
def construct(self):
c1 = Circle(color="red").shift(2 * LEFT)
c2 = Circle(color="blue").shift(RIGHT)
self.make_rigid_body(c1, c2)
c1.body.velocity = (1, 0)
self.wait(10)
2. Save the file.
3. In the terminal, run:
```terminal
manim file_name.py -pql
I want to turn off gravity for one scene, but methods from pymunk docs does not works. Firstly I tryied to change scene space gravity paramether in construct method:
But it doesn't help Then i tried to override init method for Space scene class, but it did not bring any result
Full code: