Class MultiCollisionTester
- Namespace
- Vintagestory.API.MathTools
- Assembly
- VintagestoryAPI.dll
public class MultiCollisionTester
- Inheritance
-
MultiCollisionTester
- Inherited Members
- Extension Methods
Fields
CollisionBoxList
public CachedCuboidList CollisionBoxList
Field Value
count
protected int count
Field Value
entityBox
public Cuboidd[] entityBox
Field Value
- Cuboidd[]
maxPos
public BlockPos maxPos
Field Value
minPos
public BlockPos minPos
Field Value
pos
public Vec3d pos
Field Value
tmpPos
public BlockPos tmpPos
Field Value
tmpPosDelta
public Vec3d tmpPosDelta
Field Value
Methods
ApplyTerrainCollision(Cuboidf[], int, Entity, EntityPos, float, ref Vec3d, float, float)
public void ApplyTerrainCollision(Cuboidf[] collisionBoxes, int collBoxCount, Entity entity, EntityPos entityPos, float dtFactor, ref Vec3d newPosition, float stepHeight = 1, float yExtra = 1)
Parameters
collisionBoxesCuboidf[]collBoxCountintentityEntityentityPosEntityPosdtFactorfloatnewPositionVec3dstepHeightfloatyExtrafloat
GenerateCollisionBoxList(IBlockAccessor, double, double, double, float, float)
protected virtual void GenerateCollisionBoxList(IBlockAccessor blockAccessor, double motionX, double motionY, double motionZ, float stepHeight, float yExtra)
Parameters
blockAccessorIBlockAccessormotionXdoublemotionYdoublemotionZdoublestepHeightfloatyExtrafloat
GetCollidingCollisionBox(IBlockAccessor, Cuboidf[], int, Vec3d, bool)
If given cuboidf collides with the terrain, returns the collision box it collides with. By default also checks if the cuboid is merely touching the terrain, set alsoCheckTouch to disable that.
public Cuboidd GetCollidingCollisionBox(IBlockAccessor blockAccessor, Cuboidf[] ecollisionBoxes, int collBoxCount, Vec3d pos, bool alsoCheckTouch = true)
Parameters
blockAccessorIBlockAccessorecollisionBoxesCuboidf[]collBoxCountintposVec3dalsoCheckTouchbool