This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Basics
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine.ShapeCapsule Class

Inherits from: Shape

This class is used to create collision shape in the form of a capsule.

See Also#

  • A set of UnigineScript API samples located in the <UnigineSDK>/data/samples/shapes/ folder:
    • capsule_00
    • capsule_01
    • capsule_02
    • shapes_00

ShapeCapsule Class

Properties

float Height#

The current height of the capsule.

float Radius#

The current radius of the capsule.

vec3 TopCap#

The coordinates of the center of the bottom hemisphere of the capsule.

vec3 BottomCap#

The coordinates of the center of the top hemisphere of the capsule.

Members


ShapeCapsule ( ) #

Constructor. Creates a new capsule with the zero radius and the zero height.

ShapeCapsule ( float radius, float height ) #

Constructor. Creates a new capsule with given dimensions.

Arguments

  • float radius - Radius of the capsule in units.
  • float height - Height of the capsule in units.

ShapeCapsule ( Body body, float radius, float height ) #

Constructor. Creates a new capsule with given dimensions and adds it to a given body.

Arguments

  • Body body - Body, to which the capsule will belong.
  • float radius - Radius of the capsule in units.
  • float height - Height of the capsule in units.

vec3 GetBottomCap ( ) #

Returns the coordinates of the center of the top hemisphere of the capsule.

Return value

Coordinates of the center of the capsule's top hemisphere.

vec3 GetTopCap ( ) #

Returns the coordinates of the center of the bottom hemisphere of the capsule.

Return value

Coordinates of the center of the capsule's bottom hemisphere.
Last update: 2023-02-03
Build: ()