mirror of
https://github.com/antopilo/Nuake.git
synced 2026-01-04 22:10:34 +03:00
Added LookAt to transform C# API
This commit is contained in:
@@ -54,6 +54,7 @@ namespace Nuake.Net
|
||||
internal static unsafe delegate*<int, NativeArray<float>> GetGlobalPositionIcall;
|
||||
internal static unsafe delegate*<int, NativeArray<float>> GetPositionIcall;
|
||||
internal static unsafe delegate*<int, float, float, float, void> SetPositionIcall;
|
||||
internal static unsafe delegate*<int, float, float, float, float, float, float, void> LookAtIcall;
|
||||
internal static unsafe delegate*<int, float, float, float, void> RotateIcall;
|
||||
|
||||
public TransformComponent(int entityId)
|
||||
@@ -109,6 +110,16 @@ namespace Nuake.Net
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
public void LookAt(Vector3 targetPosition)
|
||||
{
|
||||
LookAt(targetPosition, new(0, 1, 0)); // Default up direction
|
||||
}
|
||||
|
||||
public void LookAt(Vector3 targetPosition, Vector3 up)
|
||||
{
|
||||
unsafe { LookAtIcall(EntityID, targetPosition.X, targetPosition.Y, targetPosition.Z, up.X, up.Y, up.Z); }
|
||||
}
|
||||
}
|
||||
|
||||
public class LightComponent : IComponent
|
||||
|
||||
Reference in New Issue
Block a user