Adding fog

Beginner Getting started

Adding fog to your game can be a great way to change its mood and atmosphere. Enabling fog in BBMOD is really easy - simply call function bbmod_fog_set:

bbmod_fog_set(
    // The color of the fog
    BBMOD_C_SILVER,
    // The maximum intensity of the fog
    0.6,
    // The distance from the camera at which the fog starts
    100,
    // The distance from the camera at which the fog has the maximum intensity
    1000);

You can also change individual fog properties using functions bbmod_fog_set_color, bbmod_fog_set_intensity, bbmod_fog_set_start and bbmod_fog_set_end. Fog can be disabled again by setting its intensity to 0:

bbmod_fog_set_intensity(0); // Disables fog

Could not find what you were looking for?

We are still working on more tutorials. If you need additional help with BBMOD, please have a look at the documentation or join our Discord community. Thank you for your patience.

Support the development

Support us in developing BBMOD, get priority assistance and more of our amazing tools as a reward!

Become Patron

Don't miss out on a thing!

Create an account, subscribe to newsletter and get notified on new releases, tutorials and special offers.

Register Log in