How to configure
In this section we'll discuss how you can configure the Bullet plugin.
Last updated
In this section we'll discuss how you can configure the Bullet plugin.
Last updated
In ApertusVR all of the plugins are configurable by a json file belonging to the plugin. That means you must have an apeBulletPlugin.json config file too. If you don't know how to create one, please check the former section about how to use BulletPhysics plugin.
The particular json file, what is belonging to Bullet plugin must look something like this:
Compared to the other plugins, you don't have much option to configure, but let's get through it!
The first two property is responsible for the performace.
The third parameter is a scaling parameter for handling the differences between bullet's and ApertusVR's unit of distance. Roughly 1 unit in ApertusVR is 1cm, and 1 unit in Bullet Dynamics World is 1m. Therefore most of the time we need a force scale equal 100. However it can be a great opportunity to use this scaling for debug too.
The next property we discuss is the gravity. You can set any vector for gravity in Bullet Physics, so why couldn't you do it in ApertusVR? If you set it to (0,-10,0) like we did on this code sample, you get -10m/s gravity acceleration for each of your rigid body on your scene (since the forceScale is 100). Simple, isn't it?
The next two property are responsible for the liquid simulation. Let's start with the '"bouyancy". It has two other properties inside. The first tells the plugin where the water's (or any liquid's) surface, and the second tells us what is the density of the liquid. It's recommended to set the liquid density around 1.0.
If you simulating some kind of water scene, you can generate waves for it as well. That's just applying some force in a certain frequency in a certain direction, and apply it until the given duration lasts. The goal of this isn't a physically realistic wave simulation, just a good opportunity to use it in game, like the waterGame sample.
If you got this far, that means you are able to configure your Bullet Plugin as you desire. In the next section we will look through what features are provided by the plugin for adjusting a particular rigid body.