-
-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
Documentation Issue Type
- Typo or grammatical error
- Incorrect or outdated information
- Unclear explanation or confusing content
- Missing documentation for a topic
- Broken links or images
- Code example not working
- Other (please describe)
from Zoon20X on Discord:
public class CameraDemo {
public static final CameraDemo INSTANCE = new CameraDemo();
private final EventRegistry eventRegistry = new EventRegistry(new CopyOnWriteArrayList(), () -> this.isActive, "CameraDemo is not active!", (IEventRegistry)HytaleServer.get().getEventBus());
private final ServerCameraSettings cameraSettings = createServerCameraSettings();
private boolean isActive;
public void activate() {
if (this.isActive)
return;
this.eventRegistry.enable();
this.isActive = true;
this.eventRegistry.register(PlayerConnectEvent.class, event -> onAddNewPlayer(event.getPlayerRef()));
this.eventRegistry.register(PlayerMouseButtonEvent.class, this::onPlayerMouseButton);
this.eventRegistry.registerGlobal(PlayerInteractEvent.class, event -> event.setCancelled(true));
Universe.get().getPlayers().forEach(this::onAddNewPlayer);
}so the PlayerMouseButtonEvent is directly tied and registered using the CameraDemo class, this is not registered or fired in any other class, i believe this is due to how the camera works when enabling it
typing the command /player camera demo activate puts you in a top down view in game and your mouse can freely move around and click,
private final Vector2f screenPoint; this explains what this will refer to, as it wouldn't work in a locked mouse state

Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo