Skip to content
Permalink
Browse files

[Bullet] Finish height field mappings

  • Loading branch information
Eideren committed Apr 18, 2019
1 parent 635d839 commit e975e1fcd11cef5fa3b35b712b0d971195862b01
Showing with 3 additions and 3 deletions.
  1. +3 −3 sources/engine/Xenko.Physics/Shapes/HeightfieldColliderShape.cs
@@ -59,7 +59,7 @@ bool flipQuadEdges
case HeightfieldTypes.Short:
ShortArray = dynamicFieldData as UnmanagedArray<short>;

InternalShape = new BulletSharp.HeightfieldShape(HeightStickWidth, HeightStickLength, ShortArray.Pointer, HeightScale, MinHeight, MaxHeight, 1, (int)BulletPhyScalarType.PhyShort, flipQuadEdges)
InternalShape = new BulletSharp.HeightfieldTerrainShape(HeightStickWidth, HeightStickLength, ShortArray.Pointer, HeightScale, MinHeight, MaxHeight, 1, BulletSharp.PhyScalarType.Int16, flipQuadEdges)
{
LocalScaling = cachedScaling,
};
@@ -69,7 +69,7 @@ bool flipQuadEdges
case HeightfieldTypes.Byte:
ByteArray = dynamicFieldData as UnmanagedArray<byte>;

InternalShape = new BulletSharp.HeightfieldShape(HeightStickWidth, HeightStickLength, ByteArray.Pointer, HeightScale, MinHeight, MaxHeight, 1, (int)BulletPhyScalarType.PhyUchar, flipQuadEdges)
InternalShape = new BulletSharp.HeightfieldTerrainShape(HeightStickWidth, HeightStickLength, ByteArray.Pointer, HeightScale, MinHeight, MaxHeight, 1, BulletSharp.PhyScalarType.Byte, flipQuadEdges)
{
LocalScaling = cachedScaling,
};
@@ -79,7 +79,7 @@ bool flipQuadEdges
case HeightfieldTypes.Float:
FloatArray = dynamicFieldData as UnmanagedArray<float>;

InternalShape = new BulletSharp.HeightfieldShape(HeightStickWidth, HeightStickLength, FloatArray.Pointer, HeightScale, MinHeight, MaxHeight, 1, (int)BulletPhyScalarType.PhyFloat, flipQuadEdges)
InternalShape = new BulletSharp.HeightfieldTerrainShape(HeightStickWidth, HeightStickLength, FloatArray.Pointer, HeightScale, MinHeight, MaxHeight, 1, BulletSharp.PhyScalarType.Single, flipQuadEdges)
{
LocalScaling = cachedScaling,
};

0 comments on commit e975e1f

Please sign in to comment.
You can’t perform that action at this time.