mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-10 04:53:15 +08:00
Fixed runtime warnings and added gamepad controls to the readme. Also made changing the FOV faster.
This commit is contained in:
@@ -100,21 +100,21 @@ I wrote a [guide](https://framedsc.com/GeneralGuides/cinematic-unity-explorer.ht
|
||||
|
||||
The table below describes all of the relevant default hotkeys. You can edit them to your liking by going to the Options panel, changing the hotkeys you want, and saving the settings.
|
||||
|
||||
Feature | Key
|
||||
-|-
|
||||
Freecam | `Insert`
|
||||
Move the camera forward/left/right/backward | `W`/`A`/`S`/`D` - `UpArrow`/`LeftArrow`/`RightArrow`/`DownArrow`
|
||||
Move the camera upwards | `Space`
|
||||
Move the camera downwards | `LeftControl`
|
||||
Speed up movement | `LeftShift`
|
||||
Speed down movement | `LeftAlt`
|
||||
Change freecam orientation | Right mouse click
|
||||
Tilt left | `Numpad 1`
|
||||
Tilt right | `Numpad 3`
|
||||
Feature | Keyboard | Gamepad
|
||||
-|-|-
|
||||
Freecam | `Insert` |
|
||||
Move the camera forward/left/right/backward | `W`/`A`/`S`/`D` - `UpArrow`/`LeftArrow`/`RightArrow`/`DownArrow` | Left stick
|
||||
Move the camera upwards | `Space` | `LT`
|
||||
Move the camera downwards | `LeftControl` | `RT`
|
||||
Speed up movement | `LeftShift` | `Y`
|
||||
Speed down movement | `LeftAlt` | `X`
|
||||
Change freecam orientation | Right mouse click | Right stick
|
||||
Tilt left | `Numpad 1` | Dpad left
|
||||
Tilt right | `Numpad 3` | Dpad right
|
||||
Reset tilt | `Numpad 2`
|
||||
Increase FOV | `Numpad +`
|
||||
Decrease FOV | `Numpad -`
|
||||
Reset FOV | `Numpad *`
|
||||
Increase FOV | `Numpad +` | Dpad up
|
||||
Decrease FOV | `Numpad -` | Dpad down
|
||||
Reset FOV | `Numpad *` | `B`
|
||||
Pause | `PageUp`
|
||||
Block Freecam movement and rotation | `Home`
|
||||
Block games input | `Numpad .`
|
||||
@@ -122,6 +122,9 @@ Frameskip | `PageDown`
|
||||
HUD Toggle | `Delete`
|
||||
Freeze NPC animations | `Numpad 0`
|
||||
|
||||
> [!NOTE]
|
||||
> Gamepad is only compatible if the game is using [Unity Input System](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/index.html).
|
||||
|
||||
# Features
|
||||
|
||||
The following are the features I developed for this fork. All focused on making things easier for capture artists to get marketing material for studios.
|
||||
|
||||
@@ -204,7 +204,22 @@ namespace UniverseLib.Input
|
||||
{
|
||||
if (_vector2ControlType != null)
|
||||
{
|
||||
MethodInfo vector2ReadValueMethod = _vector2ControlType.GetMethod("ReadValue", Type.EmptyTypes);
|
||||
MethodInfo vector2ReadValueMethod = _vector2ControlType.GetMethod("ReadValue",
|
||||
BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly,
|
||||
null, Type.EmptyTypes, null);
|
||||
|
||||
// If not found with DeclaredOnly, try getting from base type
|
||||
if (vector2ReadValueMethod == null)
|
||||
{
|
||||
Type baseType = _vector2ControlType.BaseType;
|
||||
if (baseType != null && baseType.IsGenericType)
|
||||
{
|
||||
vector2ReadValueMethod = baseType.GetMethod("ReadValue",
|
||||
BindingFlags.Public | BindingFlags.Instance,
|
||||
null, Type.EmptyTypes, null);
|
||||
}
|
||||
}
|
||||
|
||||
if (vector2ReadValueMethod != null)
|
||||
{
|
||||
PatchMethod(vector2ReadValueMethod, null, nameof(Postfix_Vector2ReadValue));
|
||||
@@ -216,8 +231,22 @@ namespace UniverseLib.Input
|
||||
|
||||
if (_axisControlType != null)
|
||||
{
|
||||
// Patch AxisControl.ReadValue() method
|
||||
MethodInfo readValueMethod = _axisControlType.GetMethod("ReadValue", Type.EmptyTypes);
|
||||
MethodInfo readValueMethod = _axisControlType.GetMethod("ReadValue",
|
||||
BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly,
|
||||
null, Type.EmptyTypes, null);
|
||||
|
||||
// If not found with DeclaredOnly, try getting from base type
|
||||
if (readValueMethod == null)
|
||||
{
|
||||
Type baseType = _axisControlType.BaseType;
|
||||
if (baseType != null && baseType.IsGenericType)
|
||||
{
|
||||
readValueMethod = baseType.GetMethod("ReadValue",
|
||||
BindingFlags.Public | BindingFlags.Instance,
|
||||
null, Type.EmptyTypes, null);
|
||||
}
|
||||
}
|
||||
|
||||
if (readValueMethod != null)
|
||||
{
|
||||
PatchMethod(readValueMethod, null, nameof(Postfix_AxisReadValue));
|
||||
|
||||
@@ -1393,12 +1393,12 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
if (dpadUpPressed)
|
||||
{
|
||||
FreeCamPanel.GetFreecam().fieldOfView += moveSpeed;
|
||||
FreeCamPanel.GetFreecam().fieldOfView += moveSpeed * 5;
|
||||
}
|
||||
|
||||
if (dpadDownPressed)
|
||||
{
|
||||
FreeCamPanel.GetFreecam().fieldOfView -= moveSpeed;
|
||||
FreeCamPanel.GetFreecam().fieldOfView -= moveSpeed * 5;
|
||||
}
|
||||
|
||||
if (dpadLeftPressed)
|
||||
@@ -1477,12 +1477,12 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
if (IInputManager.GetKey(ConfigManager.Decrease_FOV.Value))
|
||||
{
|
||||
FreeCamPanel.GetFreecam().fieldOfView -= moveSpeed;
|
||||
FreeCamPanel.GetFreecam().fieldOfView -= moveSpeed * 5;
|
||||
}
|
||||
|
||||
if (IInputManager.GetKey(ConfigManager.Increase_FOV.Value))
|
||||
{
|
||||
FreeCamPanel.GetFreecam().fieldOfView += moveSpeed;
|
||||
FreeCamPanel.GetFreecam().fieldOfView += moveSpeed * 5;
|
||||
}
|
||||
|
||||
if (IInputManager.GetKey(ConfigManager.Reset_FOV.Value)){
|
||||
|
||||
Reference in New Issue
Block a user