Class HavokPlugin
Hierarchy
- HavokPlugin
Implements
- IPhysicsEnginePluginV2
Index
Constructors
Properties
Accessors
Methods
- _internal
Set Motion Type - add
Child - add
Constraint - apply
Force - apply
Impulse - compute
Mass Properties - dispose
- dispose
Body - dispose
Constraint - dispose
Shape - execute
Step - get
Angular Damping - get
Angular Velocity To Ref - get
Axis Friction - get
Axis Max Limit - get
Axis Min Limit - get
Axis Mode - get
Axis Motor Max Force - get
Axis Motor Target - get
Axis Motor Type - get
Body Geometry - get
Bounding Box - get
Collision Observable - get
Collisions Enabled - get
Density - get
Enabled - get
Event Mask - get
Gravity Factor - get
Linear Damping - get
Linear Velocity To Ref - get
Mass Properties - get
Motion Type - get
Num Children - get
Plugin Version - get
Shape - get
Shape Filter Collide Mask - get
Shape Filter Membership Mask - get
Shape Type - get
Time Step - init
Body - init
Body Instances - init
Constraint - init
Shape - is
Supported - raycast
- remove
Body - remove
Child - set
Angular Damping - set
Angular Velocity - set
Axis Friction - set
Axis Max Limit - set
Axis Min Limit - set
Axis Mode - set
Axis Motor Max Force - set
Axis Motor Target - set
Axis Motor Type - set
Collision Callback Enabled - set
Collisions Enabled - set
Density - set
Enabled - set
Event Mask - set
Gravity - set
Gravity Factor - set
Linear Damping - set
Linear Velocity - set
Mass Properties - set
Material - set
Motion Type - set
Physics Body Transformation - set
Shape - set
Shape Filter Collide Mask - set
Shape Filter Membership Mask - set
Time Step - sync
- sync
Transform - update
Body Instances
Constructors
constructor
Parameters
Optional _useDeltaForWorldStep: boolean
Optional hpInjection: any
Returns HavokPlugin
Properties
_hknpSearch playground for _hknp
Reference to the WASM library
nameSearch playground for name
Name of the plugin
on Collision ObservableSearch playground for onCollisionObservable
worldSearch playground for world
Created Havok world which physics bodies are added to
Accessors
num Bodies
Gets the number of bodies in the world
Returns any
Methods
_internal Set Motion TypeSearch playground for _internalSetMotionType
Parameters
pluginData: BodyPluginData
motionType: PhysicsMotionType
Returns void
add ChildSearch playground for addChild
Adds a child shape to the given shape.
Parameters
shape: PhysicsShape
The parent shape.
newChild: PhysicsShape
The child shape to add.
Optional translation: Vector3
Optional rotation: Quaternion
Optional scale: Vector3
Returns void
add ConstraintSearch playground for addConstraint
Adds a constraint to the physics engine.
Parameters
body: PhysicsBody
The main body to which the constraint is applied.
childBody: PhysicsBody
The body to which the constraint is applied.
constraint: PhysicsConstraint
The constraint to be applied.
Optional instanceIndex: number
If this body is instanced, the index of the instance to which the constraint will be applied. If not specified, no constraint will be applied.
Optional childInstanceIndex: number
If the child body is instanced, the index of the instance to which the constraint will be applied. If not specified, no constraint will be applied.
Returns void
apply ForceSearch playground for applyForce
Applies a force to a physics body at a given location.
Parameters
body: PhysicsBody
The physics body to apply the impulse to.
force: Vector3
The force vector to apply.
location: Vector3
The location in world space to apply the impulse.
Optional instanceIndex: number
The index of the instance to apply the force to. If not specified, the force will be applied to all instances.
This method is useful for applying a force to a physics body at a given location. This can be used to simulate physical forces such as explosions, collisions, and gravity.
Returns void
apply ImpulseSearch playground for applyImpulse
Applies an impulse to a physics body at a given location.
Parameters
body: PhysicsBody
The physics body to apply the impulse to.
impulse: Vector3
The impulse vector to apply.
location: Vector3
The location in world space to apply the impulse.
Optional instanceIndex: number
The index of the instance to apply the impulse to. If not specified, the impulse will be applied to all instances.
This method is useful for applying an impulse to a physics body at a given location. This can be used to simulate physical forces such as explosions, collisions, and gravity.
Returns void
compute Mass PropertiesSearch playground for computeMassProperties
Computes the mass properties of a physics body, from it's shape
Parameters
body: PhysicsBody
The physics body to copmute the mass properties of
Optional instanceIndex: number
Returns PhysicsMassProperties
disposeSearch playground for dispose
Dispose the world and free resources
Returns void
dispose BodySearch playground for disposeBody
Disposes a physics body.
Parameters
body: PhysicsBody
The physics body to dispose.
This method is useful for releasing the resources associated with a physics body when it is no longer needed. This is important for avoiding memory leaks in the physics engine.
Returns void
dispose ConstraintSearch playground for disposeConstraint
Disposes a physics constraint.
Parameters
constraint: PhysicsConstraint
The physics constraint to dispose.
This method is useful for releasing the resources associated with a physics constraint, such as the Havok constraint, when it is no longer needed. This is important for avoiding memory leaks.
Returns void
dispose ShapeSearch playground for disposeShape
Releases a physics shape from the physics engine.
Parameters
shape: PhysicsShape
The physics shape to be released.
Returns void
void
This method is useful for releasing a physics shape from the physics engine, freeing up resources and preventing memory leaks.
execute StepSearch playground for executeStep
Executes a single step of the physics engine.
Parameters
delta: number
The time delta in seconds since the last step.
physicsBodies: PhysicsBody[]
An array of physics bodies to be simulated.
Returns void
void
This method is useful for simulating the physics engine. It sets the physics body transformation, steps the world, syncs the physics body, and notifies collisions. This allows for the physics engine to accurately simulate the physics bodies in the world.
get Angular DampingSearch playground for getAngularDamping
Gets the angular damping of a physics body.
Parameters
body: PhysicsBody
The physics body to get the angular damping from.
Optional instanceIndex: number
Returns number
The angular damping of the body.
This function is useful for retrieving the angular damping of a physics body, which is used to control the rotational motion of the body. The angular damping is a value between 0 and 1, where 0 is no damping and 1 is full damping.
get Angular Velocity To RefSearch playground for getAngularVelocityToRef
Gets the angular velocity of a body.
Parameters
body: PhysicsBody
The body to get the angular velocity from.
angVel: Vector3
The vector3 to store the angular velocity.
This method is useful for getting the angular velocity of a body in a physics engine. It takes the body and a vector3 as parameters and stores the angular velocity of the body in the vector3. This is useful for getting the angular velocity of a body in order to calculate the motion of the body in the physics engine.
Optional instanceIndex: number
Returns void
get Axis FrictionSearch playground for getAxisFriction
Gets the friction value of the specified axis of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to get the axis friction from.
axis: PhysicsConstraintAxis
The axis to get the friction from.
Returns number
The friction value of the specified axis.
get Axis Max LimitSearch playground for getAxisMaxLimit
Gets the maximum limit of the given axis of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to get the maximum limit from.
axis: PhysicsConstraintAxis
The axis to get the maximum limit from.
Returns number
The maximum limit of the given axis of the given constraint.
get Axis Min LimitSearch playground for getAxisMinLimit
Gets the minimum limit of the specified axis of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to get the minimum limit from.
axis: PhysicsConstraintAxis
The axis to get the minimum limit from.
Returns number
The minimum limit of the specified axis of the given constraint.
get Axis ModeSearch playground for getAxisMode
Gets the axis limit mode of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to get the axis limit mode from.
axis: PhysicsConstraintAxis
The axis to get the limit mode from.
Returns PhysicsConstraintAxisLimitMode
The axis limit mode of the given constraint.
get Axis Motor Max ForceSearch playground for getAxisMotorMaxForce
Gets the maximum force of the motor of the given constraint axis.
Parameters
constraint: PhysicsConstraint
The constraint to get the motor maximum force from.
axis: PhysicsConstraintAxis
The axis of the constraint to get the motor maximum force from.
Returns number
The maximum force of the motor of the given constraint axis.
get Axis Motor TargetSearch playground for getAxisMotorTarget
Gets the target of the motor of the given axis of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to get the motor target from.
axis: PhysicsConstraintAxis
The axis of the constraint to get the motor target from.
Returns number
The target of the motor of the given axis of the given constraint.
get Axis Motor TypeSearch playground for getAxisMotorType
Gets the motor type of the specified axis of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to get the motor type from.
axis: PhysicsConstraintAxis
The axis of the constraint to get the motor type from.
Returns PhysicsConstraintMotorType
The motor type of the specified axis of the given constraint.
get Body GeometrySearch playground for getBodyGeometry
Gets the geometry of a physics body.
Parameters
body: PhysicsBody
The physics body.
Returns { indices: never[]; positions: never[] } | { indices: Uint32Array; positions: Float32Array }
An object containing the positions and indices of the body's geometry.
get Bounding BoxSearch playground for getBoundingBox
Calculates the bounding box of a given physics shape.
Parameters
shape: PhysicsShape
The physics shape to calculate the bounding box for.
Returns BoundingBox
The calculated bounding box.
This method is useful for physics engines as it allows to calculate the boundaries of a given shape. Knowing the boundaries of a shape is important for collision detection and other physics calculations.
get Collision ObservableSearch playground for getCollisionObservable
Return the collision observable for a particular physics body.
Parameters
body: PhysicsBody
the physics body
Returns Observable<IPhysicsCollisionEvent>
get Collisions EnabledSearch playground for getCollisionsEnabled
Gets whether collisions are enabled for the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to get collisions enabled for.
Returns boolean
Whether collisions are enabled for the given constraint.
get DensitySearch playground for getDensity
Calculates the density of a given physics shape.
Parameters
shape: PhysicsShape
The physics shape to calculate the density of.
Returns number
The density of the given physics shape.
get EnabledSearch playground for getEnabled
Gets the enabled state of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to get the enabled state from.
Returns boolean
The enabled state of the given constraint.
get Event MaskSearch playground for getEventMask
Retrieves the event mask of a physics body.
Parameters
body: PhysicsBody
The physics body to retrieve the event mask from.
Optional instanceIndex: number
Returns number
The event mask of the physics body.
get Gravity FactorSearch playground for getGravityFactor
Get the gravity factor of a body
Parameters
body: PhysicsBody
the physics body to get the gravity factor from
Optional instanceIndex: number
the index of the instance in an instanced body. If not specified, the gravity factor of the first instance will be returned.
Returns number
the gravity factor
get Linear DampingSearch playground for getLinearDamping
Gets the linear damping of the given body.
Parameters
body: PhysicsBody
The body to get the linear damping from.
Optional instanceIndex: number
Returns number
The linear damping of the given body.
This method is useful for getting the linear damping of a body in a physics engine. Linear damping is a force that opposes the motion of the body and is proportional to the velocity of the body. It is used to simulate the effects of air resistance and other forms of friction.
get Linear Velocity To RefSearch playground for getLinearVelocityToRef
Gets the linear velocity of a physics body and stores it in a given vector.
Parameters
body: PhysicsBody
The physics body to get the linear velocity from.
linVel: Vector3
The vector to store the linear velocity in.
This function is useful for retrieving the linear velocity of a physics body, which can be used to determine the speed and direction of the body. This information can be used to simulate realistic physics behavior in a game.
Optional instanceIndex: number
Returns void
get Mass PropertiesSearch playground for getMassProperties
Parameters
body: PhysicsBody
Optional instanceIndex: number
Returns PhysicsMassProperties
get Motion TypeSearch playground for getMotionType
Parameters
body: PhysicsBody
Optional instanceIndex: number
Returns PhysicsMotionType
get Num ChildrenSearch playground for getNumChildren
Returns the number of children of the given shape.
Parameters
shape: PhysicsShape
The shape to get the number of children from.
Returns number
The number of children of the given shape.
get Plugin VersionSearch playground for getPluginVersion
Returns the version of the physics engine plugin.
Returns number
The version of the physics engine plugin.
This method is useful for determining the version of the physics engine plugin that is currently running.
get ShapeSearch playground for getShape
Gets the shape of a physics body. This will create a new shape object
Parameters
body: PhysicsBody
The physics body.
Returns Nullable<PhysicsShape>
The shape of the physics body.
get Shape Filter Collide MaskSearch playground for getShapeFilterCollideMask
Parameters
shape: PhysicsShape
Returns number
get Shape Filter Membership MaskSearch playground for getShapeFilterMembershipMask
Parameters
shape: PhysicsShape
Returns number
get Shape TypeSearch playground for getShapeType
Gets the type of a physics shape.
Parameters
shape: PhysicsShape
The physics shape to get the type for.
Returns PhysicsShapeType
The type of the physics shape.
get Time StepSearch playground for getTimeStep
Gets the fixed time step used by the physics engine.
Returns number
The fixed time step used by the physics engine.
init BodySearch playground for initBody
Initializes a physics body with the given position and orientation.
Parameters
body: PhysicsBody
The physics body to initialize.
motionType: PhysicsMotionType
The motion type of the body.
position: Vector3
The position of the body.
orientation: Quaternion
The orientation of the body. This code is useful for initializing a physics body with the given position and orientation. It creates a plugin data for the body and adds it to the world. It then converts the position and orientation to a transform and sets the body's transform to the given values.
Returns void
init Body InstancesSearch playground for initBodyInstances
Initializes the body instances for a given physics body and mesh.
Parameters
body: PhysicsBody
The physics body to initialize.
motionType: PhysicsMotionType
How the body will be handled by the engine
mesh: Mesh
The mesh to initialize.
This code is useful for creating a physics body from a mesh. It creates a body instance for each instance of the mesh and adds it to the world. It also sets the position of the body instance to the position of the mesh instance. This allows for the physics engine to accurately simulate the mesh in the world.
Returns void
init ConstraintSearch playground for initConstraint
Initializes a physics constraint with the given parameters.
Parameters
constraint: PhysicsConstraint
The physics constraint to be initialized.
body: PhysicsBody
The main body
childBody: PhysicsBody
The child body.
Optional instanceIndex: number
If this body is instanced, the index of the instance to which the constraint will be applied. If not specified, no constraint will be applied.
Optional childInstanceIndex: number
If the child body is instanced, the index of the instance to which the constraint will be applied. If not specified, no constraint will be applied.
This function is useful for setting up a physics constraint in a physics engine.
Returns void
init ShapeSearch playground for initShape
Initializes a physics shape with the given type and parameters.
Parameters
shape: PhysicsShape
The physics shape to initialize.
type: PhysicsShapeType
The type of shape to initialize.
options: PhysicsShapeParameters
The parameters for the shape.
This code is useful for initializing a physics shape with the given type and parameters. It allows for the creation of a sphere, box, capsule, container, cylinder, mesh, and heightfield. Depending on the type of shape, different parameters are required. For example, a sphere requires a radius, while a box requires extents and a rotation.
Returns void
is SupportedSearch playground for isSupported
If this plugin is supported
Returns boolean
true if its supported
raycastSearch playground for raycast
Performs a raycast from a given start point to a given end point and stores the result in a given PhysicsRaycastResult object.
Parameters
from: Vector3
The start point of the raycast.
to: Vector3
The end point of the raycast.
result: PhysicsRaycastResult
The PhysicsRaycastResult object to store the result of the raycast.
Performs a raycast. It takes in two points, from and to, and a PhysicsRaycastResult object to store the result of the raycast. It then performs the raycast and stores the hit data in the PhysicsRaycastResult object.
Returns void
remove BodySearch playground for removeBody
Removes a body from the world. To dispose of a body, it is necessary to remove it from the world first.
Parameters
body: PhysicsBody
The body to remove.
Returns void
remove ChildSearch playground for removeChild
Removes a child shape from a parent shape.
Parameters
shape: PhysicsShape
The parent shape.
childIndex: number
The index of the child shape to remove.
Returns void
set Angular DampingSearch playground for setAngularDamping
Sets the angular damping of a physics body.
Parameters
body: PhysicsBody
The physics body to set the angular damping for.
damping: number
The angular damping value to set.
This function is useful for controlling the angular velocity of a physics body. By setting the angular damping, the body's angular velocity will be reduced over time, allowing for more realistic physics simulations.
Optional instanceIndex: number
Returns void
set Angular VelocitySearch playground for setAngularVelocity
Sets the angular velocity of a physics body.
Parameters
body: PhysicsBody
The physics body to set the angular velocity of.
angVel: Vector3
The angular velocity to set.
This function is useful for setting the angular velocity of a physics body in a physics engine. This allows for more realistic simulations of physical objects, as they can be given a rotational velocity.
Optional instanceIndex: number
Returns void
set Axis FrictionSearch playground for setAxisFriction
Sets the friction of the given axis of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to set the friction of.
axis: PhysicsConstraintAxis
The axis of the constraint to set the friction of.
friction: number
The friction to set.
Returns void
void
set Axis Max LimitSearch playground for setAxisMaxLimit
Sets the maximum limit of the given axis of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to set the maximum limit of the given axis.
axis: PhysicsConstraintAxis
The axis to set the maximum limit of.
limit: number
The maximum limit to set.
Returns void
set Axis Min LimitSearch playground for setAxisMinLimit
Sets the minimum limit of the given axis of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to set the minimum limit of.
axis: PhysicsConstraintAxis
The axis to set the minimum limit of.
limit: number
The minimum limit to set.
Returns void
set Axis ModeSearch playground for setAxisMode
Sets the limit mode of the specified axis of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to set the axis mode of.
axis: PhysicsConstraintAxis
The axis to set the limit mode of.
limitMode: PhysicsConstraintAxisLimitMode
The limit mode to set.
Returns void
set Axis Motor Max ForceSearch playground for setAxisMotorMaxForce
Sets the maximum force that can be applied by the motor of the given constraint axis.
Parameters
constraint: PhysicsConstraint
The constraint to set the motor max force for.
axis: PhysicsConstraintAxis
The axis of the constraint to set the motor max force for.
maxForce: number
The maximum force that can be applied by the motor.
Returns void
set Axis Motor TargetSearch playground for setAxisMotorTarget
Sets the target of an axis motor of a constraint.
Parameters
constraint: PhysicsConstraint
The constraint to set the axis motor target of.
axis: PhysicsConstraintAxis
The axis of the constraint to set the motor target of.
target: number
The target of the axis motor.
Returns void
set Axis Motor TypeSearch playground for setAxisMotorType
Sets the motor type of the given axis of the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to set the motor type of.
axis: PhysicsConstraintAxis
The axis of the constraint to set the motor type of.
motorType: PhysicsConstraintMotorType
The motor type to set.
Returns void
void
set Collision Callback EnabledSearch playground for setCollisionCallbackEnabled
Enable collision to be reported for a body when a callback is settup on the world
Parameters
body: PhysicsBody
the physics body
enabled: boolean
Returns void
set Collisions EnabledSearch playground for setCollisionsEnabled
Enables or disables collisions for the given constraint.
Parameters
constraint: PhysicsConstraint
The constraint to enable or disable collisions for.
isEnabled: boolean
Whether collisions should be enabled or disabled.
Returns void
set DensitySearch playground for setDensity
Sets the density of a physics shape.
Parameters
shape: PhysicsShape
The physics shape to set the density of.
density: number
The density to set.
Returns void
set EnabledSearch playground for setEnabled
Enables or disables a constraint in the physics engine.
Parameters
constraint: PhysicsConstraint
The constraint to enable or disable.
isEnabled: boolean
Whether the constraint should be enabled or disabled.
Returns void
set Event MaskSearch playground for setEventMask
Sets the event mask of a physics body.
Parameters
body: PhysicsBody
The physics body to set the event mask for.
eventMask: number
The event mask to set.
This function is useful for setting the event mask of a physics body, which is used to determine which events the body will respond to. This is important for ensuring that the physics engine is able to accurately simulate the behavior of the body in the game world.
Optional instanceIndex: number
Returns void
set GravitySearch playground for setGravity
Sets the gravity of the physics world.
Parameters
gravity: Vector3
The gravity vector to set.
Returns void
set Gravity FactorSearch playground for setGravityFactor
Sets the gravity factor of a body
Parameters
body: PhysicsBody
the physics body to set the gravity factor for
factor: number
the gravity factor
Optional instanceIndex: number
the index of the instance in an instanced body
Returns void
set Linear DampingSearch playground for setLinearDamping
Sets the linear damping of the given body.
Parameters
body: PhysicsBody
The body to set the linear damping for.
damping: number
The linear damping to set.
This method is useful for controlling the linear damping of a body in a physics engine. Linear damping is a force that opposes the motion of the body, and is proportional to the velocity of the body. This method allows the user to set the linear damping of a body, which can be used to control the motion of the body.
Optional instanceIndex: number
Returns void
set Linear VelocitySearch playground for setLinearVelocity
Sets the linear velocity of a physics body.
Parameters
body: PhysicsBody
The physics body to set the linear velocity of.
linVel: Vector3
The linear velocity to set.
This function is useful for setting the linear velocity of a physics body, which is necessary for simulating motion in a physics engine. The linear velocity is the speed and direction of the body's movement.
Optional instanceIndex: number
Returns void
set Mass PropertiesSearch playground for setMassProperties
Sets the mass properties of a physics body.
Parameters
body: PhysicsBody
The physics body to set the mass properties of.
massProps: PhysicsMassProperties
The mass properties to set.
Optional instanceIndex: number
The index of the instance to set the mass properties of. If undefined, the mass properties of all the bodies will be set. This function is useful for setting the mass properties of a physics body, such as its mass, inertia, and center of mass. This is important for accurately simulating the physics of the body in the physics engine.
Returns void
set MaterialSearch playground for setMaterial
Sets the material of a physics shape.
Parameters
shape: PhysicsShape
The physics shape to set the material of.
material: PhysicsMaterial
The material to set.
Returns void
set Motion TypeSearch playground for setMotionType
Parameters
body: PhysicsBody
motionType: PhysicsMotionType
Optional instanceIndex: number
Returns void
set Physics Body TransformationSearch playground for setPhysicsBodyTransformation
Sets the transformation of the given physics body to the given transform node.
Parameters
body: PhysicsBody
The physics body to set the transformation for.
node: TransformNode
The transform node to set the transformation from. Sets the transformation of the given physics body to the given transform node.
This function is useful for setting the transformation of a physics body to a transform node, which is necessary for the physics engine to accurately simulate the motion of the body. It also takes into account instances of the transform node, which is necessary for accurate simulation of multiple bodies with the same transformation.
Returns void
set ShapeSearch playground for setShape
Sets the shape of a physics body.
Parameters
body: PhysicsBody
The physics body to set the shape for.
shape: Nullable<PhysicsShape>
The physics shape to set.
This function is used to set the shape of a physics body. It is useful for creating a physics body with a specific shape, such as a box or a sphere, which can then be used to simulate physical interactions in a physics engine. This function is especially useful for meshes with multiple instances, as it will set the shape for each instance of the mesh.
Returns void
set Shape Filter Collide MaskSearch playground for setShapeFilterCollideMask
Parameters
shape: PhysicsShape
collideMask: number
Returns void
set Shape Filter Membership MaskSearch playground for setShapeFilterMembershipMask
Parameters
shape: PhysicsShape
membershipMask: number
Returns void
set Time StepSearch playground for setTimeStep
Sets the fixed time step for the physics engine.
Parameters
timeStep: number
The fixed time step to use for the physics engine.
Returns void
syncSearch playground for sync
Synchronizes the transform of a physics body with its transform node.
Parameters
body: PhysicsBody
The physics body to synchronize.
This function is useful for keeping the physics body's transform in sync with its transform node. This is important for ensuring that the physics body is accurately represented in the physics engine.
Returns void
sync TransformSearch playground for syncTransform
Synchronizes the transform of a physics body with the transform of its corresponding transform node.
Parameters
body: PhysicsBody
The physics body to synchronize.
transformNode: TransformNode
The destination Transform Node.
This code is useful for synchronizing the position and orientation of a physics body with the position and orientation of its corresponding transform node. This is important for ensuring that the physics body and the transform node are in the same position and orientation in the scene. This is necessary for the physics engine to accurately simulate the physical behavior of the body.
Returns void
update Body InstancesSearch playground for updateBodyInstances
Update the internal body instances for a given physics body to match the instances in a mesh.
Parameters
body: PhysicsBody
the body that will be updated
mesh: Mesh
the mesh with reference instances
Returns void
The Havok Physics plugin