add PhysX SDK and some tweaks
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user