This site requires JavaScript, please enable it in your browser!
Greenfoot back
RedPanda98
RedPanda98 wrote ...

2016/3/7

Creating gravity with different strengths.

RedPanda98 RedPanda98

2016/3/7

#
I'm creating a gas law simulation. What I need is when the temperature is at zero the gravity is at 100% so particles will be falling to the ground. When the temperature slider is increased, particles would be able to move slowly and up a bit. And at a higher temperature, gravity is 0 so the particles will be moving around the box.
danpost danpost

2016/3/7

#
I have a set of support classes that may help here. The first is my QActor class which gives instances of its subclasses precision movement and turning. The second one is a subclass of QActor, called 'GQActor', which additionally provides instances of its subclasses variable gravity. They are located in my GQActor Superclass Demo scenario. You can download and open the scenario within greenfoot to check out the two classes.
You need to login to post a reply.