Table of Contents

Class ParticlePhysics

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll
public class ParticlePhysics
Inheritance
ParticlePhysics
Inherited Members
Extension Methods

Constructors

ParticlePhysics(IBlockAccessor)

public ParticlePhysics(IBlockAccessor blockAccess)

Parameters

blockAccess IBlockAccessor

Fields

AsyncSpawnTime

public const float AsyncSpawnTime = 0.033

Field Value

float

BlockAccess

public IBlockAccessor BlockAccess

Field Value

IBlockAccessor

CollisionBoxList

public CachedCuboidList CollisionBoxList

Field Value

CachedCuboidList

MotionCap

public float MotionCap

Field Value

float

PhysicsTickTime

public float PhysicsTickTime

Field Value

float

Methods

CollisionStrength(Vec3f, Vec3f, float, float)

public Vec3f CollisionStrength(Vec3f velocitybefore, Vec3f velocitynow, float gravityStrength, float deltatime)

Parameters

velocitybefore Vec3f
velocitynow Vec3f
gravityStrength float
deltatime float

Returns

Vec3f

HandleBoyancy(Vec3d, Vec3f, bool, float, float, float)

public void HandleBoyancy(Vec3d pos, Vec3f velocity, bool boyant, float gravityStrength, float deltatime, float height)

Parameters

pos Vec3d
velocity Vec3f
boyant bool
gravityStrength float
deltatime float
height float

UpdateMotion(Vec3d, Vec3f, float)

Updates the velocity vector according to the amount of passed time, gravity and terrain collision.

public EnumCollideFlags UpdateMotion(Vec3d pos, Vec3f motion, float size)

Parameters

pos Vec3d
motion Vec3f
size float

Returns

EnumCollideFlags