Kraken Logo

Kraken Engine

DocumentationGuidesShowcaseCommunity
Ctrl
K
Navigating the Docs
Building Docs
Overview
Anchor
AnimationController
Audio
Batcher
Body
Camera
Capsule
CastHit
CharacterBody
Circle
Collision
Color
DistanceJoint
Effect
Event
FilterJoint
Flip (Texture)
Font
ImageLayer
InputAction
Joint
Layer
Line
Map
MapObject
Mask
MotorJoint
MouseJoint
ObjectGroup
Orchestrator
PixelArray
PolarCoordinate
Polygon
PrismaticJoint
Rect
RevoluteJoint
RigidBody
Sample
Sampler
Shader
SheetStrip
StaticBody
Stream
Style
Terrain (TileSet)
Text
TextProperties
Texture
Tile (TileLayer)
Tile (TileSet)
TileLayer
TileResult (TileLayer)
TileSet
Timer
Transform
Tween
Vec2
Vertex
WeldJoint
WheelJoint
World

Built bydurkisneer1.Kraken Engine is open source and available onGitHub.

  1. Docs
  2. Classes
  3. Body

Body

Base class for all physics bodies. Access via the 'physics' submodule.

Experimental API:

The physics submodule is an experimental and new API that is highly susceptible to breaking changes in the future.

Properties


NameDescriptionType
posThe position of the body in world coordinates.Vec2
rotationThe rotation of the body in radians.float
collision_layerThe body's collision layer (category bits).int
collision_maskThe body's collision mask.int
is_validIndicates whether the body is not destroyed.bool

Methods


Get Transform

get_transform() → Transformget_transform() → Transform

Get the current transform of the body (position, rotation, and scale).

Returns

Transform : The current transform of the body.

Destroy

destroy() → Nonedestroy() → None

Destroy the body manually.

PreviousBatcher
NextCamera

On this page

PropertiesMethodsGet TransformDestroy