public override void UpdateStaticCollider() { if (m_physicsMesh != null) { AffineTransform transform = new AffineTransform(WorldScale.ToBepu(), WorldRotation.ToBepu(), WorldPosition.ToBepu()); m_physicsMesh.WorldTransform = transform; } }
protected void SetPhysicsFromLoadedMesh() { if (m_physicsMesh != null) { m_physicsMesh.Shape = m_meshAssetReference.GetAsset().GetPhysicsInstancedMesh(); m_physicsMesh.Sidedness = TriangleSidedness.Clockwise; } else { m_physicsMesh = new InstancedMesh(m_meshAssetReference.GetAsset().GetPhysicsInstancedMesh()); } m_physicsMesh.WorldTransform = new AffineTransform(WorldScale.ToBepu(), WorldRotation.ToBepu(), WorldPosition.ToBepu()); }
public override void UpdateStaticCollider() { RigidTransform shapeTransform = new RigidTransform(WorldPosition.ToBepu(), WorldRotation.ToBepu()); m_scaledStaticCollidable.UpdateBoundingBoxForTransform(ref shapeTransform); }
public override void GetStaticCollidablesWithScale(List <Collidable> outCollidables) { UpdateScaledShape(); m_scaledStaticCollidable.WorldTransform = new RigidTransform(WorldPosition.ToBepu(), WorldRotation.ToBepu()); outCollidables.Add(m_scaledStaticCollidable); }