Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivorforce/godot4-custom-gravity
A sample project for Godot 4 with custom gravity controls.
https://github.com/ivorforce/godot4-custom-gravity
godot
Last synced: 3 months ago
JSON representation
A sample project for Godot 4 with custom gravity controls.
- Host: GitHub
- URL: https://github.com/ivorforce/godot4-custom-gravity
- Owner: Ivorforce
- License: mit
- Created: 2023-05-27T22:04:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-16T15:20:16.000Z (12 months ago)
- Last Synced: 2024-04-28T04:13:55.430Z (9 months ago)
- Topics: godot
- Language: GDScript
- Homepage:
- Size: 1.58 MB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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!](https://youtu.be/7gZzDM-29WQ)
## 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.