Virtual Camera Update
This commit is contained in:
parent
0e4f09e19c
commit
e88bfc81af
|
@ -18,7 +18,15 @@ namespace Rokojori
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( obj is float || obj is double )
|
if ( obj is float )
|
||||||
|
{
|
||||||
|
var floatValue = (float) obj;
|
||||||
|
var doubleValue = (double) floatValue;
|
||||||
|
output.Append( RegexUtility.WriteDouble( doubleValue ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( obj is double )
|
||||||
{
|
{
|
||||||
output.Append( RegexUtility.WriteDouble( (double)obj ) );
|
output.Append( RegexUtility.WriteDouble( (double)obj ) );
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -18,8 +18,16 @@ namespace Rokojori
|
||||||
[Export]
|
[Export]
|
||||||
public bool refreshSlots = false;
|
public bool refreshSlots = false;
|
||||||
|
|
||||||
|
[Export]
|
||||||
|
public bool active = false;
|
||||||
|
|
||||||
public override void _Process( double delta )
|
public override void _Process( double delta )
|
||||||
{
|
{
|
||||||
|
if ( ! active )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LerpCameras( delta );
|
LerpCameras( delta );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +74,26 @@ namespace Rokojori
|
||||||
c =>
|
c =>
|
||||||
{
|
{
|
||||||
var priority = MathF.Max( 0, c.smoothedPriority );
|
var priority = MathF.Max( 0, c.smoothedPriority );
|
||||||
var rotation = c.camera.GetCameraRotation();
|
var rotation = c.camera.GetCameraRotation();
|
||||||
|
|
||||||
|
if ( ! rotation.IsFinite() || rotation.Length() == 0 )
|
||||||
|
{
|
||||||
|
rotation = new Quaternion();
|
||||||
|
rotation.X = 0;
|
||||||
|
rotation.Y = 0;
|
||||||
|
rotation.Z = 0;
|
||||||
|
rotation.W = 1;
|
||||||
|
rotation = rotation.Normalized();
|
||||||
|
//RJLog.Log( "Rotation was weird" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//RJLog.Log( "Rotation is fine" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//RJLog.Log( rotation.X, rotation.Y, rotation.Z, rotation.W );
|
||||||
var vUp = rotation * Vector3.Up;
|
var vUp = rotation * Vector3.Up;
|
||||||
var vForward = rotation * Vector3.Forward;
|
var vForward = rotation * Vector3.Forward;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue