Skip to content

Commit

Permalink
Added Rotation to Actor and changed organization
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinPtrl committed Mar 16, 2022
1 parent 0daae13 commit fe5517e
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 14 deletions.
20 changes: 20 additions & 0 deletions SoTCoreExternal/Data/Quaternion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SoT.Data
{
public struct Quaternion
{
public float X;
public float Y;
public float Z;
public float W;
public override string ToString()
{
return String.Format("(X : {0} Y: {1} Z: {2} W: {3} )", X,Y,Z,W);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Threading.Tasks;

namespace SoT
namespace SoT.Data
{
public struct Vector3
{
Expand All @@ -13,7 +13,7 @@ public struct Vector3
public float Z;
public override string ToString()
{
return "(X : " + X + " Y: " + Y + " Z: " + Z + ")";
return String.Format("(X : {0} Y: {1} Z: {2})", X, Y, Z);
}
}
}
11 changes: 7 additions & 4 deletions SoTCoreExternal/SoTCoreExternal.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,17 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Data\Quaternion.cs" />
<Compile Include="SotCore.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UE4Actor.cs" />
<Compile Include="UE4Engine.cs" />
<Compile Include="UEObject.cs" />
<Compile Include="SotStuff.cs" />
<Compile Include="UE4\UE4Actor.cs" />
<Compile Include="UE4\UE4Engine.cs" />
<Compile Include="UE4\UEObject.cs" />
<Compile Include="Util\Memory.cs" />
<Compile Include="Util\SigScan.cs" />
<Compile Include="Vector3.cs" />
<Compile Include="Data\Vector3.cs" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
1 change: 1 addition & 0 deletions SoTCoreExternal/SotCore.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using SoT.Util;
using System;
using SoT.UE4;

namespace SoT
{
Expand Down
12 changes: 12 additions & 0 deletions SoTCoreExternal/SotStuff.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SoTCoreExternal
{
public class SotStuff
{
}
}
18 changes: 12 additions & 6 deletions SoTCoreExternal/UE4Actor.cs → SoTCoreExternal/UE4/UE4Actor.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
using System;
using SoT.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace SoT
namespace SoT.UE4
{
public struct FTransform
{
public float x;
public float y;
public float z;
public float w;
public Quaternion Rotation;
public Vector3 Translation;
public Vector3 Scale3D;
};
Expand Down Expand Up @@ -84,6 +82,14 @@ public Vector3 Position
}
}

public Quaternion Rotation
{
get
{
return actor.GetRootComponent().transform.Rotation;
}
}

public UE4Actor(ulong address) : base(address)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Text;
using System.Threading.Tasks;

namespace SoT
namespace SoT.UE4
{
public class UE4Engine
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Text;
using System.Threading.Tasks;

namespace SoT
namespace SoT.UE4
{
public class UEObject
{
Expand Down
2 changes: 2 additions & 0 deletions SotCoreTest/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Threading;
using SoT;
using SoT.UE4;

namespace SotEspCoreTest
{
class Program
Expand Down

0 comments on commit fe5517e

Please sign in to comment.