Physics panel

(Redirected from Physics Panel)
Jump to: navigation, search


He intermediate.png

This page is about the HeroBlade panel, along with a tutorial for how to test and save different collision representations for various objects. For the toolbar, see Physics Toolbar.

The HeroBlade Physics Panel is primarily used for debugging purposes, or to make advanced adjustments to the Collision Representations for specific assets.

Physics Debug Options

The top section of the Physics Panel, labeled "Physics Debug Options", controls the visualization of the Collision Representations. Each object in the viewport can be a member of a Collision Group (CG). The checkboxes in the Physics Panel allow you to select and de-select which CGs that you would like to see at any one time.

The color swatch next to each Collision Group shows the color that will be used in the Viewport for that Collision Group. Usually this is a wireframe, but this can also be displayed as a solid color with the dropdown menu. Commonly seen types of Collision Groups include:


Physics Shape Editor

This section of the Physics Panel is where it is possible to experiment with different forms of Collision Representation for a particular asset. Then if one is found which is acceptable, the new Collision Representation can be published to the server, where it is saved in a Physics INI file in the Repository. Once published, every instance of that asset in the world adopts the new form of collision representation, unless that instance has been specifically overridden, on a per-instance basis, via the PhysicsType field in its Properties panel.

Options in the Shape Editor are:

The asset's collision representation is based on the polygon mesh of the object. Standard for STATIC objects. This type of representation is very precise, but can also be very CPU-intensive, so it is often better to come up with a more streamlined method.
Standard for DYNAMIC objects. This is a sort of shrink-wrapped version of the object
The object's collision representation is based as though it is shaped like a rectangular box
The object's collision representation is based as though it is a faceted sphere
Customizable collision representation, made by "gluing" several convex hulls together. A "Decomposition Depth" slider on the panel can adjust the detail of the shape.

Testing new shapes

To test a new representation:

The new physics shape should appear around the selected asset.

character into it, dropping the object from the sky, dropping other physics-enabled onto it, dropping the object onto other physics-enabled objects, etc.

Note: The "Test Build Asset" button only modifies the representation for testing purposes, only in your current area and is not saved.

Custom shapes

Aside from a sphere, box, exact mesh, or convex hull, it is also possible to create a custom collision representation, which offers a Convex Decomposition of the object.

CUSTOM_SHAPE for player collision is:

The goal is to make things as simple as possible, but as complex as necessary.

To create a custom shape:

Tutorial: Physics Shape Editor

For STATIC objects, the "Shape" of a physics representation is something specified by the artist when an asset is being created. When the object is set to be DYNAMIC, the collision representation will automatically switch to CONVEXHULL. However, sometimes designers may wish to create a custom shape for an object.

IMPORTANT: The Properties panel property of PhysicsShape overrides anything that is set via the Physics Shape Editor. In the below example, it means that the particular instance of this object's collision representation will always be "Convex Hull". However, other instances of the same object which still have properties as "Default Shape", will match whatever was published via the Shape Editor.

The Physics section of the Properties panel will override anything set via the Physics Panel, unless PhysicsShape is set to DEFAULT_SHAPE. In this example, this instance will always use ConvexHull, regardless of what was done for the object in the Shape Editor.

To ensure that the shape can be edited, do the following before proceeding with this tutorial:

Simple Sphere
Convex Hull
Custom shape

The box and sphere are very light in terms of CPU resources, but not as useful for game play. A happy medium between "Exact Mesh" and the box or sphere, is a convex hull. This can be thought of as a sort of "Shrink-wrapped" version of the object.

Note that each change to a Test Build Asset here is affecting only the version on your own client, and not the server representation. If you were to click on Build and Publish, this would send your choice of physics representation to the server, which would then update the collision representation of all objects of this type in the game (it is recommended to not do this as part of the tutorial)

Server physics representation

To see the difference between the client and server physics representations:

See also

Personal tools