コード例 #1
0
 public override void UpdateStaticCollider()
 {
     if (m_physicsMesh != null)
     {
         AffineTransform transform = new AffineTransform(WorldScale.ToBepu(), WorldRotation.ToBepu(), WorldPosition.ToBepu());
         m_physicsMesh.WorldTransform = transform;
     }
 }
コード例 #2
0
 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());
 }
コード例 #3
0
        public override void UpdateStaticCollider()
        {
            RigidTransform shapeTransform = new RigidTransform(WorldPosition.ToBepu(), WorldRotation.ToBepu());

            m_scaledStaticCollidable.UpdateBoundingBoxForTransform(ref shapeTransform);
        }
コード例 #4
0
 public override void GetStaticCollidablesWithScale(List <Collidable> outCollidables)
 {
     UpdateScaledShape();
     m_scaledStaticCollidable.WorldTransform = new RigidTransform(WorldPosition.ToBepu(), WorldRotation.ToBepu());
     outCollidables.Add(m_scaledStaticCollidable);
 }