Table of Contents

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

CachedCuboidList

count

protected int count

Field Value

int

entityBox

public Cuboidd[] entityBox

Field Value

Cuboidd[]

maxPos

public BlockPos maxPos

Field Value

BlockPos

minPos

public BlockPos minPos

Field Value

BlockPos

pos

public Vec3d pos

Field Value

Vec3d

tmpPos

public BlockPos tmpPos

Field Value

BlockPos

tmpPosDelta

public Vec3d tmpPosDelta

Field Value

Vec3d

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

collisionBoxes Cuboidf[]
collBoxCount int
entity Entity
entityPos EntityPos
dtFactor float
newPosition Vec3d
stepHeight float
yExtra float

GenerateCollisionBoxList(IBlockAccessor, double, double, double, float, float)

protected virtual void GenerateCollisionBoxList(IBlockAccessor blockAccessor, double motionX, double motionY, double motionZ, float stepHeight, float yExtra)

Parameters

blockAccessor IBlockAccessor
motionX double
motionY double
motionZ double
stepHeight float
yExtra float

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

blockAccessor IBlockAccessor
ecollisionBoxes Cuboidf[]
collBoxCount int
pos Vec3d
alsoCheckTouch bool

Returns

Cuboidd