IrrAddCollisionAnimator

section index

## NAME

IrrAddCollisionAnimator - Adds a collision animator to a node

## SYNOPSIS

*animator.l = IrrAddCollisionAnimator(*irr_selector.l, *irr_node.l, radiusx.f, radiusy.f, radiusz.f,gravityx.f,gravityy.f,gravityz.f,offsetx.f,offsety.f,offsetz.f)

## INPUTS

*irr_selector.l | - | represents a selection of triangles in the scene, this is usually all of the triangles in a map For instance. Please refer to the section on collision for further details of how To obtain this object.
*irr_node.l | - | refers to a node you have added to the scene.

radiusx.f, radiusy.f, radiusx.f

-

Define an ellipsoid that defines the area of collision
this eliptical shape allows the collision detection To slide
the object up steps and even ladders. If you make it too big
you might be too large to get through a doorway but if you make
it too small you may not be able to climb steps. You should play
with these values and find the best ones for your scene.

gravityx.f, gravityy.f, gravityz.f | - | work together to specify the force that is applied to the node To make it drop to the ground. Other values could be used to simulate wind effects.
offsetx.f, offsety.f, offsetz.f | - | are used To offset the node by a specific distance from the center of the collision, as the center of the object and the size of your collision ellipsoid vary you can use this To adjust the position of the node and to bring it into contact with the ground.

## FUNCTION

This adds a collision animator to a node that applies collision detection and gravity to the object. The collision detection will stop the object penetrating through a surface in the objects it is colliding against and will also press it against the surface using gravity.

## EXAMPLE

       *CollisionAnimator.l = IrrAddCollisionAnimator( *MapCollision, *CameraNode, 30.0,30.0,30.0, 0.0,-3.0,0.0,  0.0,50.0,0.0 )

## RESULT

pointer to a Irrlicht-Animator.