Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
Free camera API

Free camera API

This mod allows you to more easily modify the camera behavior through code.​

8,721
11
Library

Compatibility

Minecraft: Java Edition

1.21.x
1.20.1

Platforms

Forge
NeoForge

Supported environments

Client-side

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source
DonateDonate on Ko-fi

Creators

AnECanSaiTin
AnECanSaiTin Member

Details

Licensed GPL-3.0-or-later
Published 11 months ago
Updated 2 weeks ago
DescriptionGalleryChangelogVersions

Free camera API V3

Logo

What are the advantages?

  • Decouples from camera internals, reducing complexity.
  • Simple and flexible usage.
  • Supports loading chunks beyond the player's view range (with expansion).​

How to Register and Use the Plugin

  1. Create the plugin class

    @CameraPlugin(value = "example", priority = ModifierPriority.LOWEST)
    public class ExamplePlugin implements ICameraPlugin {
        // ...
    }
    

    value: Plugin unique identifier (string)
    priority: Priority setting (ModifierPriority.HIGH/LOWEST etc.)

  2. Initialization

    @Override
    public void initialize(ICameraModifier modifier) {
        this.modifier = modifier;
        modifier.enable();
    }
    
  3. Update camera data every frame

    modifier
                .enablePos() // Enable position modification
                .enableRotation() // Enable rotation modification
                .enableFov() // Enable FOV modification
                .setPos(1, 2, 3) // Set camera position to (1,2,3), default is local coordinates centered on player
                .addPos(1, 2, 3)
                .setRotationYXZ(90f, 15f, 25f) // Set camera rotation to (90f, 15f, 25f)
                .move(0, 0, -5) // Move camera based on current rotation
                .enableGlobalMode() // Enable global mode, all coordinates and rotations will be modified according to world coordinates
                .enableChunkLoader() // Enable chunk loader, load chunks around the camera. An additional Free Camera API Addition mod needs to be installed to enable this feature, otherwise it will have no effect
                .enableObstacle() // Enable collision detection
    

Gallery

Dolly zoom Roll

Modrinth is open source.

main@396f737

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.