Hology
Hology 文檔
Hology 文檔
  • 👋歡迎來到Hology文檔
  • Getting started
    • Hology Engine簡介
    • 第一步指南
    • 編輯器基礎指南
      • 在場景中飛行
      • 放置物件
      • 選擇物件
      • 變換
      • 分組物件
      • 複製
    • 入門遊戲模板 - 第三人稱射擊遊戲
  • Tutorials
    • 滾球 - 遊戲玩法編程
    • 角色動畫程式設計
    • Character AI behavior
  • Release
    • 遊戲發行
      • Discord Activities
      • 臉書即時遊戲
      • 上傳至 Itch.io
      • 使用 GitHub Pages
      • 發布到Steam
      • iOS 和 Android
  • Assets
    • 3D模型
      • 客製化碰撞形狀
      • 材質自訂分配
    • 材質
    • 紋理
    • 預製體
  • Gameplay
    • 演員(Actors)
      • 創建演員類
      • 演員參數
      • Actor 元件
      • Actor 的生命週期
      • 生成 Actors
      • 移動 Actors
    • 服務
      • 載入資產
    • Player input
    • Collision detection
    • Physics
      • Physics body types
      • Applying forces
      • Ray casting
    • Trigger volumes
    • Character movement
    • Pointer events
    • Animation
      • Animation system
      • Character Animation
      • Animation State Machine
    • Sound
      • Audio parameter
    • 世界
    • Navigation
  • Shaders
    • 著色器介紹
    • Creating shaders
    • 著色器參數
    • Typescript shaders
      • Types
      • Math functions
      • Attributes
      • Varying
      • Uniforms
      • Textures
      • Arrays
      • Select
      • Lighting
    • Painted materials
    • Water shader tutorial
  • Level design
    • 地形雕刻
    • 地形繪製
    • Grass
  • User Interfaces
    • 創建用戶界面UI
    • 使用 React
    • VR
  • Visual Effects
    • 視覺效果簡介
    • 視覺特效資產
  • Integrations
    • Arcweave
由 GitBook 提供支持
在本页
  • Static Bodies
  • Kinematic Bodies
  • Dynamic Bodies
  1. Gameplay
  2. Physics

Physics body types

The physics system needs to understand how to simulate physics for an object and how these objects will interact with others. The physics body type has great effect on this so it is important to select an appropriate type.

Static Bodies

Description: Static bodies are objects that do not move. They are unaffected by forces or collisions, and they do not have a velocity. Static bodies are typically used for objects that are part of the environment or scene and should remain stationary, such as the ground, walls, or other immovable objects.

Characteristics:

  • Immovable: Static bodies remain in a fixed position.

  • Unaffected by Forces: They do not respond to forces, impulses, or collisions.

  • No Dynamics: They do not have linear or angular velocity.

Usage Example: Static bodies are used for objects like floors, platforms, or boundaries in a game or simulation, where these objects should not move but can interact with dynamic bodies.

Kinematic Bodies

Description: Kinematic bodies are objects that can move but are not influenced by physics forces. Their movement is controlled by setting their velocity or position directly. Kinematic bodies are useful for objects that need to follow a specific path or animation, such as moving platforms or characters with scripted movements.

Characteristics:

  • Controlled Motion: Kinematic bodies are moved explicitly by setting their position or velocity.

  • Unaffected by Forces: They do not respond to forces, impulses, or collisions, but they can affect dynamic bodies through collisions.

  • Predictable Movement: Their motion is defined by the programmer or simulation logic.

Usage Example: Kinematic bodies are used for objects that need to move in a controlled manner, such as elevators, moving platforms, or NPCs following a path.

Dynamic Bodies

Description: Dynamic bodies are objects that are fully simulated by the physics engine. They respond to forces, impulses, and collisions, and their motion is determined by the laws of physics. Dynamic bodies are used for objects that need realistic physical behavior, such as characters, vehicles, and objects that can be thrown or pushed.

Characteristics:

  • Fully Simulated: Dynamic bodies are affected by forces, impulses, collisions, and gravity.

  • Realistic Motion: Their movement is determined by physics calculations, making them behave naturally.

  • Interactive: They can interact with other bodies (static, kinematic, and dynamic).

Usage Example: Dynamic bodies are used for objects that need to behave realistically in a physical simulation, such as balls and crates

上一页Physics下一页Applying forces