Back to mods
CameraEditor project artwork

CurseForge · Hytale mod

CameraEditor

This is a basic API to create new camera and custom mouse controls and interactions. This is still a work in progress.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which CameraEditor release should I use?

Updated 4 months ago
Latest stable file CameraEditor-1.0.1.jar
Game version Not listed
Mod system Built-in Hytale mod system

CameraEditor-1.0.1.jar targets Hytale. Do not install it as a separate client mod. Enable it on the world host—the local server in singleplayer or the dedicated server in multiplayer. No required dependencies listed for this file.

Where it goes

Where should CameraEditor be installed in Hytale?

Do not install it as a separate client mod. Enable it on the world host—the local server in singleplayer or the dedicated server in multiplayer.

Separate client mod Not supported
World host / dedicated server Required
Mod system for this release Built-in Hytale mod system
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

Put Hytale mods on the world host or dedicated server. Singleplayer runs a local server too; Hytale does not use separate client mods.

What else does CameraEditor-1.0.1.jar need?

CameraEditor-1.0.1.jar. Change the file and its required mods may change too.

No required dependencies listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional project dependencies. Check the creator notes before changing an existing world.

Before you install it

Add CameraEditor without breaking your instance.

Built for CameraEditor-1.0.1.jar. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use CameraEditor-1.0.1.jar. It targets Hytale; another release may target a different game build or dependency set.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Enable it on the world host

    Do not install it as a separate client mod. Enable it on the world host—the local server in singleplayer or the dedicated server in multiplayer.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside CameraEditor-1.0.1.jar. It opens that exact file at the source.

About this project

What does CameraEditor add?

Gamemode API

This is a basic API to create pseudo gamemodes with custom camera and custom mouse controle and interactions. This is still a work in progress.

Set up a custom gamemode

Custom Camera

Simply create a new instance of ServerCameraSettings with your custom settings (see official doc)

Built-in camera modes:

  • topDown
  • sideView
  • isometric
  • isometric2 (functionnaly the same but with a more complete constructor)

Example of a top-down view

ServerCameraSettings cameraSettings = new ServerCameraSettings();
cameraSettings.positionLerpSpeed = 0.2F;
cameraSettings.rotationLerpSpeed = 0.2F;
cameraSettings.distance = 20.0F;
cameraSettings.displayCursor = true;
cameraSettings.sendMouseMotion = true;
cameraSettings.isFirstPerson = false;
cameraSettings.movementForceRotationType = MovementForceRotationType.Custom;
cameraSettings.eyeOffset = true;
cameraSettings.positionDistanceOffsetType = PositionDistanceOffsetType.DistanceOffset;
cameraSettings.rotationType = RotationType.Custom;
cameraSettings.rotation = new Direction(0.0F, (-(float)Math.PI / 2F), 0.0F);
cameraSettings.mouseInputType = MouseInputType.LookAtPlane;
cameraSettings.planeNormal = new Vector3f(0.0F, 1.0F, 0.0F);
CameraTemplates.set("myCustomTemplate", cameraSettings);

Custom Mouse Control

To create a custom mouse controle, create a new java class that extend AbstractMouseControl and override the mouse button abstract methods, the default mouse controle is adapted to top-down view but not very adapted to the others.

the abstract class handle the mouse event dispatch and some data parsing, but you can override it if you need more control.

Create the camera instance

Now in the setup() of your plugin, create the cameraSetting, the MouseControle class and after that, create the camera instance with the code

new CameraInitializer("myInstanceName", new myCustomMouseControle(), false, "myCameraTemplate");

The false is a WIP setting to have the player invisible, it works but crash the client, so I recommend keeping it to false.

Example with the available default options:

new CameraInitializer("isometricCamera2", new DefaultMouseControl(), false, "isometric");

Apply Camera to a player

To apply or remove the custom gamemode, simply add the PlayerPOVComponent to the player. Do not forget to remove it if it was already present as it won't register properly otherwise.

PlayerPOVComponent pPOV = store.getComponent(ref, PlayerPOVComponent.getComponentType());
if (pPOV != null)
    store.removeComponent(ref, PlayerPOVComponent.getComponentType());
store.addComponent(ref, PlayerPOVComponent.getComponentType(), new PlayerPOVComponent(name));

Custom commands

  • /camera Command group for individual camera management
    • /camera get Get the name of the current camera instance
    • /camera reset Reset all camera, controls and setting to default
    • /camera set <cameraInstanceName> Apply the given camera configuration
  • /cameraGroup Command group for global camera management
    • /cameraGroup activate <cameraInstanceName>
    • /cameraGroup deactivate <cameraInstanceName>

A disabled camera group reset all players using it to default and player cannot use the configuration until reenabled


Technical issues and WIP stuff

The HidePlayer feature is a setting that exist but is unused in the game to make a kind of spectator mode, I tried to use it, and to some extend it works, but it seem to have a bad interaction with the MouseControle and consistently crash the client, but not the server.

The ECS part is a bit clunky, but if I wanted to use a component, I couldn't find another cleaner way to do it.

I am working on a way to automatize the process with some event such as joining a specific instance or if you use a specific item, but I need to have a working logic and way to make it modular for easy configuration.

I welcome any feedback and advices to improve the idea.

Project description from CurseForge.

Recent files

CameraEditor releases and Hytale builds

4 of 4 releases match

Looking for an older file? The official CurseForge project page is in Resources.