Skip to content

Ivorforce/Godot4-Custom-Gravity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Godot4 Custom Gravity: A sample project

This repository provides a sample implementation for custom gravity in Godot 4.

Check out the video I made about this implementation too!

How it works

A Gravity object, e.g. PointGravity, is attached to objects that exhibits gravitational forces. It requires a BoundingShape (on collision layer 2). Physical gravity wells also require a FalloffModel.

A BalancePoint is attached to a gravity-affected object. The object collects gravitational forces acting upon it. Its owner (e.g. Player.gd) uses this information to provide gravitationally correct controls.

About

A sample project for Godot 4 with custom gravity controls.

Topics

Resources

License

Stars

Watchers

Forks