Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhysXTest - Unreal Engine 4 Physics Demos

A collection of physics simulation demos built with Unreal Engine 4.27 and PhysX to showcase various physics scenarios and stress-test the engine's physics capabilities.

Purpose

This project serves as a testbed for exploring PhysX physics simulations in Unreal Engine 4. Each demo focuses on different aspects of physics simulation.

Target Engine: Unreal Engine 4.27 with PhysX physics backend. Can also be used for comparison with Chaos physics (UE5).

Implementation Note: All object spawning is done in C++ to avoid Blueprint VM overhead and ensure accurate physics performance benchmarking.

  • Rigid body dynamics - Mass, velocity, collisions
  • Large-scale simulations - Hundreds to thousands of physics objects
  • Broadphase performance - Many simultaneous collisions
  • Stacking stability - Object piling and structural integrity

Demos

Wrecking Ball

A massive ball impacts a brick wall, testing impulse transfer and large-scale destruction physics.

Wrecking Ball

Features:

  • Configurable wall dimensions (rows/columns)
  • Adjustable brick mass and size
  • Ball mass, radius, and launch velocity settings
  • Wall collapse mode (gravity only) or ball impact mode

Domino Effect

Classic domino chain reaction demonstrating sequential collision propagation.

Domino

Features:

  • Curved domino arrangements
  • Precise collision timing
  • Chain reaction physics

Fluid Particles

Simulates fluid-like behavior using hundreds of small physics spheres in a container.

Fluid Particles

Features:

  • 500+ particle spheres
  • Container with physics walls
  • Stirring force simulation
  • Broadphase stress testing

Tower Stacking

Physics cubes spawned from above, forming unstable tower structures that eventually collapse.

Tower Stacking

Features:

  • Gradual cube spawning (configurable rate)
  • Random or fixed cube sizes
  • Auto-restart after simulation time
  • Up to 1000+ physics objects

Technical Details

GameModes

Each demo has its own GameMode class with exposed properties for easy configuration:

GameMode Description
APhysXDemoGameMode Basic cube spawning demo
APhysXWreckingBallGameMode Wall destruction with ball impact
APhysXDominoGameMode Domino chain effect
APhysXStackingTowerGameMode Tower building simulation
APhysXFluidParticlesGameMode Particle container simulation
APhysXExplosionGameMode Explosion physics
APhysXConveyorGameMode Conveyor belt simulation

Configuration

All demos support:

  • Auto-restart - Automatically resets after configurable time
  • Debug stats - On-screen physics statistics
  • Material customization - Custom materials for objects
  • Blueprint exposure - All properties editable in Blueprint

Requirements

  • Unreal Engine 4.27
  • PhysXVehicles plugin (enabled)
  • Windows 64-bit

Setup

  1. Clone the repository
  2. Right-click PhysXTest.uproject and select "Generate Visual Studio project files"
  3. Open in Unreal Editor or build from Visual Studio
  4. Open any L_* level (e.g., L_WreckingBall, L_Domino)
  5. Press Play to start the simulation

Levels

Level Demo
L_CubeFalls Basic cube spawning
L_WreckingBall Wrecking ball demo
L_Domino Domino effect
L_TowerStacking Tower stacking
L_FluidParticle Fluid particles

License

This project is for educational and testing purposes.

About

Unreal Engine 4.27 physics test scenes for benchmarking PhysX/Chaos - wrecking balls, dominoes, fluid particles, stacking towers

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages