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. Capsule

Capsule

Represents a capsule shape with two points and a radius.

Constructor

  • Capsule() → CapsuleCapsule() → Capsule
  • Capsule(p1: Vec2, p2: Vec2, radius: float) → CapsuleCapsule(p1: Vec2, p2: Vec2, radius: float) → Capsule
  • Capsule(x1: float, y1: float, x2: float, y2: float, radius: float) → CapsuleCapsule(x1: float, y1: float, x2: float, y2: float, radius: float) → Capsule

Represents a capsule shape with two points and a radius.

Properties


NameDescriptionType
p1The first point.Vec2
p2The second point.Vec2
radiusThe radius.float

Methods


As Rect

as_rect() → Rectas_rect() → Rect

Get the axis-aligned bounding box of the capsule.

Returns

Rect : The bounding box.

Copy

copy() → Capsulecopy() → Capsule

Create a copy of the capsule.

Returns

Capsule : The copy.

PreviousCamera
NextCastHit

On this page

ConstructorPropertiesMethodsAs RectCopy