GFX
  • Docs
  • API
Search Results for

    Show / Hide Table of Contents
    • Genesis.Core
      • AssetManager
      • DirectionalLight
      • Game
      • GameElement
      • GameEventHandler
      • IGameBehavior
      • Input
      • Input.Keys
      • Layer
      • Light
      • Light2D
      • PointLight
      • Scene
      • Scene2D
      • Scene3D
      • SceneEventHandler
      • SceneSizeEvenHandler
      • Storage
      • Utils
      • Window
      • Window.WindowEventHandler
      • WindowUtilities
      • WindowUtilities.POINT
      • WindowUtilities.RECT
    • Genesis.Core.Behaviors
      • AnimationBehavior
      • CameraFlags
      • CharacterController2D
      • ControllerPreset
      • MoveDirection
      • MovementFlags
      • SpriteMovementController
    • Genesis.Core.Behaviors.Physics2D
      • BoxCollider
      • BoxRigidBody
      • BoxTrigger2D
      • BufferedSpriteCollider
      • PhysicsBox2D
      • PhysicsPolygon2D
      • Rigidbody2D
    • Genesis.Core.Behaviors.Physics3D
      • BoxCollider
      • BoxRigidBody
      • BoxTrigger
      • CapsuleCollider
      • CapsuleRigidBody
      • CompoundMeshCollider
      • ConvexHullBehavior
      • ConvexHullCollider
      • MeshCollider
      • QubeConvexHull
      • SphereCollider
      • SphereRigidBody
      • SphereTrigger
      • StaticMeshBehavior
    • Genesis.Core.Behaviors._3D
      • Stance
      • ThirdpersonCharacterController
    • Genesis.Core.GameElements
      • BufferedSprite
      • CameraElement
      • Element3D
      • Empty
      • FindPathAsynchResult
      • GridCell
      • Model
      • NavMesh
      • Obstacle
      • ParticleBuffers
      • ParticleDeffinition
      • ParticleEmitter
      • Qube
      • RectElement
      • Skybox
      • Sphere
      • Sprite
      • SpriteShapeDeffinition
      • Terrain2D
      • Terrain3D
      • TerrainData
      • Waypoint
    • Genesis.Graphics
      • Animation
      • AnimationCallback
      • AnimationCallback.AnimationEvent
      • Camera
      • CameraType
      • Face
      • Font
      • Framebuffer
      • Frustum
      • Glyphe
      • IRenderDevice
      • InstancedElement
      • InstancedMesh
      • Material
      • MaterialBuffer
      • Mesh
      • PerspectiveCamera
      • RenderInstanceContainer
      • RenderSettings
      • Shader
      • ShaderProgram
      • SpriteSheet
      • TexCoords
      • Texture
      • Viewport
    • Genesis.Graphics.Animation3D
      • Animation
      • Animator
      • AssimpNodeData
      • Bone
      • KeyPosition
      • KeyRotation
      • KeyScale
      • ModelMesh
      • boneinfo
      • vertex
    • Genesis.Graphics.Physics
      • BulletDebugRenderer
    • Genesis.Graphics.RenderDevice
      • GLRenderer
      • LegacyRenerer
    • Genesis.Graphics.Shaders.OpenGL
      • AnimatedModelShader
      • BasicShader
      • BorderCircleShader
      • DiffuseLightning
      • DiffuseNormalLightning
      • DiffuseNormalShader
      • DiffuseShader
      • DiffuseSolidShader
      • Element3DShader
      • FXScreenSpaceShadowShader
      • InstanceShader2D
      • InstancedShader
      • Light2DShader
      • LightmapShader
      • MVPRectShader
      • MVPShader
      • MVPSolidShader
      • ParticleShader
      • ScreenShader
      • SkyboxShader
      • SolidShapeShader
      • SpecularShader
      • SpriteShader
      • TerrainShader
      • WireframeShader
    • Genesis.Graphics.Shapes
      • BufferedSpriteShape
      • CircleShape
      • FrameShape
      • GlypheShape
      • Light2DShape
      • LineShape
      • PlaneShape
      • QubeShape
      • RectShape
      • Shape
      • SphereShape
      • SpriteShape
    • Genesis.Math
      • Matrix4x4
      • NoisePoint
      • PerlinNoise
      • Rect
      • Vec3
    • Genesis.Physics
      • Aabb
      • ColliderBehavior2D
      • ColliderBehavior3D
      • CollisionGroup
      • CollisionGroupExtensions
      • HitResult
      • HitResult2D
      • MatrixSet
      • MouseRay2
      • PhysicHandler
      • PhysicHandlerEvent
      • PhysicPropeterys
      • PhysicsBehavior
      • PhysicsBehaviorEvent
      • PhysicsHandler2D
      • PhysicsHandler3D
      • Ray2D
      • Raycast
      • Raycast2D
      • RigidBodyBehavior2D
      • RigidBodyBehavior3D
      • TriggerBehavior2D
      • TriggerBehavior3D
    • Genesis.UI
      • Button
      • Canvas
      • GridView
      • ImageButton
      • Label
      • ListItem
      • ListItemBehavior
      • ListSelector
      • ListSelectorBehavior
      • Panel
      • ProgressBar
      • UIEvent
      • UIParseHandler
      • UIParser
      • Widget
      • WidgetAnchor
    • Genesis.UI.Items
      • GridViewImageIcon
      • IItem

    Class Rigidbody2D

    Represents a 2D physics behavior for game elements.

    Inheritance
    object
    IGameBehavior
    PhysicsBehavior
    RigidBodyBehavior2D
    Rigidbody2D
    Inherited Members
    RigidBodyBehavior2D.Rotate(Vec3)
    RigidBodyBehavior2D.Rotate(float)
    RigidBodyBehavior2D.Translate(Vec3)
    RigidBodyBehavior2D.Translate(float, float)
    RigidBodyBehavior2D.AngularVelocity(float)
    RigidBodyBehavior2D.AngularVelocity(Vec3)
    RigidBodyBehavior2D.LinearVelocity(float, float)
    RigidBodyBehavior2D.LinearVelocity(Vec3)
    RigidBodyBehavior2D.GetPhysicsObject()
    RigidBodyBehavior2D.GetPhysicsObject<T>()
    RigidBodyBehavior2D.OnUpdate(Game, GameElement)
    RigidBodyBehavior2D.OnDestroy(Game, GameElement)
    RigidBodyBehavior2D.OnInit(Game, GameElement)
    RigidBodyBehavior2D.OnRender(Game, GameElement)
    RigidBodyBehavior2D.RigidBody
    RigidBodyBehavior2D.Offset
    RigidBodyBehavior2D.PhysicHandler
    PhysicsBehavior.Collide(Scene, Game, GameElement)
    PhysicsBehavior.OnCollide
    IGameBehavior.Parent
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Genesis.Core.Behaviors.Physics2D
    Assembly: Genesis.dll
    Syntax
    public class Rigidbody2D : RigidBodyBehavior2D

    Constructors

    Rigidbody2D(PhysicHandler)

    Initializes a new instance of the Rigidbody2D class with the specified physics handler.

    Declaration
    public Rigidbody2D(PhysicHandler handler)
    Parameters
    Type Name Description
    PhysicHandler handler

    The physics handler.

    Properties

    AngularFactor

    Gets or sets the angular factor for the rigid body.

    Declaration
    public Vec3 AngularFactor { get; set; }
    Property Value
    Type Description
    Vec3

    EnablePhysic

    Gets or sets whether physics is enabled.

    Declaration
    public bool EnablePhysic { get; set; }
    Property Value
    Type Description
    bool

    LinearFactor

    Gets or sets the linear factor for the rigid body.

    Declaration
    public Vec3 LinearFactor { get; set; }
    Property Value
    Type Description
    Vec3

    Methods

    CreateRigidBody(float, int, int)

    Creates the rigid body with the specified mass.

    Declaration
    public override void CreateRigidBody(float mass, int collisionGroup = -1, int collisionMask = -1)
    Parameters
    Type Name Description
    float mass

    The mass of the rigid body.

    int collisionGroup
    int collisionMask
    Overrides
    RigidBodyBehavior2D.CreateRigidBody(float, int, int)

    CreateRigidbody(float, float, float, int, int)

    Creates the rigid body with the specified mass, capsule radius, and capsule height.

    Declaration
    public void CreateRigidbody(float mass, float capsuleRadius, float capsuleHeight, int collisionGroup = -1, int collisionMask = -1)
    Parameters
    Type Name Description
    float mass

    The mass of the rigid body.

    float capsuleRadius

    The radius of the capsule shape.

    float capsuleHeight

    The height of the capsule shape.

    int collisionGroup
    int collisionMask
    In this article
    Back to top Generated by DocFX