applyGravity

Operators.Camera.applyGravity()
applyGravity(view: IView, pointObject: Point3, downVector: Point3, maxFallDistance: (None | number)): Promise

This returns the final position of a point object when gravity is applied. If there are no floors to collide with, null is returned.

It is the caller’s responsibility to interpolate smooth motion if desired.

Parameters

view: IView

The View of the scene.

pointObject: Point3

The point object to fall.

downVector: Point3

The vector used to determine the direction of fall.

maxFallDistance: (None | number)

If the fall distance would exceed this value, then gravity is not applied at all.

Returns: Promise