add PhysX SDK and some tweaks

This commit is contained in:
2025-12-17 12:39:20 +08:00
parent 57ca6c30f5
commit 00d3993a77
26 changed files with 1594 additions and 132 deletions

View File

@ -5,6 +5,7 @@ namespace Example
public class BasicController : Entity
{
public float Speed;
public float DistanceFromPlayer = 20.0F;
private Entity m_PlayerEntity;
@ -17,8 +18,10 @@ namespace Example
{
Mat4 transform = GetTransform();
Vec3 playerTranstation = m_PlayerEntity.GetTransform().Translation;
Vec3 translation = transform.Translation;
translation.XY = m_PlayerEntity.GetTransform().Translation.XY;
translation.XY = playerTranstation.XY;
translation.Z = playerTranstation.Z + DistanceFromPlayer;
translation.Y = Math.Max(translation.Y, 4.5f);
transform.Translation = translation;
SetTransform(transform);