Torque 3D - Script Manual: PhysicsShape Class Reference

TorqueScript

Main   Class List   Namespace List   Online

PhysicsShape Class Reference
[Physics]

Represents a destructible physical object simulated through the plugin system. More...

Inheritance diagram for PhysicsShape:

List of all members.

Public Member Functions

void destroy ()
 Disables rendering and physical simulation.
bool isDestroyed ()
 Returns if a PhysicsShape has been destroyed or not.
void restore ()
 Restores the shape to its state before being destroyed.

Public Attributes

PhysicsShape

bool playAmbient
 Enables or disables playing of an ambient animation upon loading the shape.

Static Public Attributes

static bool isRenderable
 Disables rendering of all instances of this type.
static bool isSelectable
 Disables selection of all instances of this type.
static bool noCorrections
 Determines if the shape will recieve corrections from the server or will instead be allowed to diverge.
static bool noSmoothing
 Determines if client-side shapes will attempt to smoothly transition to their new position after reciving a correction.

Detailed Description

Represents a destructible physical object simulated through the plugin system.

See also:
PhysicsShapeData.

Member Function Documentation

void PhysicsShape::destroy (  ) 

Disables rendering and physical simulation.

Calling destroy() will also spawn any explosions, debris, and/or destroyedShape defined for it, as well as remove it from the scene graph.

Destroyed objects are only created on the server. Ghosting will later update the client.

Note:
This does not actually delete the PhysicsShape.
bool PhysicsShape::isDestroyed (  ) 

Returns if a PhysicsShape has been destroyed or not.

void PhysicsShape::restore (  ) 

Restores the shape to its state before being destroyed.

Re-enables rendering and physical simulation on the object and adds it to the client's scene graph. Has no effect if the shape is not destroyed.


Member Data Documentation

Enables or disables playing of an ambient animation upon loading the shape.

Note:
The ambient animation must be named "ambient".


Copyright © GarageGames, LLC. All Rights Reserved.