LordAshes-MoreCamerasPlugin icon

MoreCamerasPlugin

dependency library for creating and removing additional cameras which render the scene including props and tiles.

Last updated 2 years ago
Total downloads 1994
Total rating 0 
Categories Tweaks Tools Integration
Dependency string LordAshes-MoreCamerasPlugin-1.1.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

bbepisTaleSpire-BepInExPack-5.4.10 icon
bbepisTaleSpire-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.10
brcoding-SetInjectionFlagPlugin-2.3.0 icon
brcoding-SetInjectionFlagPlugin

Allows players to flag mods are installed

Preferred version: 2.3.0

README

Extra Assets Registration Plugin

This unofficial TaleSpire dependency plugin for allows the creation of additional cameras for rendering the scene from different points of view. Unlike a regular added camera which will not render props and tiles, this plugin provides cameras that include props and tiles. This plugin uses brute force method to achieve this so it is not recommended to generate lots of different cameras with this plugin as performance will be impacted. Settings for different device performance profiles are available.

This plugin, like all others, is free but if you want to donate, use: http://LordAshes.ca/TalespireDonate/Donate.php

Change Log

1.1.0: Fix bug with parent methods being private
1.1.0: Added bit of performance optimization
1.0.0: Initial release

Install

Use R2ModMan or similar installer to install this plugin.

Set the desired device performance level using the R2ModMan configuration for this plugin.

Usage

This is a dependency plugin so it is used by the source code of other plugins and is not used directly by the user. Normally the user does not need to deal with the most of the AuxCamera object settings except to move or rotate a camera because the parent AddCamera and RemoveCamera methods setup the settings on behalf of the user.

Camera List method

AddCamera(string name, Rect projectionScreen) AddCamera(string name, Rect projectionScreen, Vector3 pos) AddCamera(string name, Rect projectionScreen, Vector3 pos, Vector3 rot) Used to add new camera to the camera list with the indicated name. Cameras start off in the off state. The projection screen parameter is used to derermine at what position and size the camera view will be on the screen. The optional parameters for position and rotation dictate the starting location of the camera.

RemoveCamera(string name) Removes the camera with the indicated name if it exists.

AuxCamera object

The AuxCamera object holds information about the camera and its projection on to the screen.

active (Read Only) indicates if the camera is currently on or off. camera (Read Only) holds the corresponding camera object. projection (Read Only) holds the position and size of the rendered camera on the screen. updateFrameInterval indicates the device's performance profile. Determines how often the camera is refreshed.

AuxCamera methods

AuxCamera(string name, Rect projectionScreen) constructor which sets the camera name and the screen projection area. AuxCamera(string name, Rect projectionScreen, Vector3 cameraPos, Vector3 cameraRot) constructor which sets the camera name, screen projection and the starting camera position and starting camera orientation.

On() Turns the camera on. Off() Turns the camera off.

MoveTo(Vector3 pos) Instantly moves the camera position to the indicated position. RotateTo(Vector3 pos) Instantly rotates the camera orientation to the indicated orientation.

AttachTo(GameObject controller, bool sync ) Attaches the camera to a game object so that the camera moves with the game object. The optional sync parameter indicates if the camera is first moved to the controller location and rotated to match the rotation of the controller or not.

Render() Renders the camera view to the screen area defined by the screen projection settings.

Remove() and Dispose() Removes the underlying camera. Used prior to a AuxCamera from the camera list.

Sample Camera Code

AuxCamera cam = AddCamera("HelmetCam", new Rect(30,40,640,360));
cam.On();
cam.MoveTo(0,-2.0,0);
cam.RotateTo(0,-10,0);
cam.AttachTo(heroMini);

or

AuxCamera cam = AddCamera("HelmetCam", new Rect(30,40,640,360));
cam.On();
cam.AttachTo(heroMini, true);