godot-parkour/addons/qodot/game_definitions/fgd/solid_classes/physics.gd

26 lines
443 B
GDScript3
Raw Permalink Normal View History

2024-02-22 19:56:13 +00:00
@tool
class_name PhysicsEntity
extends RigidBody3D
@export var properties: Dictionary :
get:
return properties
set(new_properties):
if(properties != new_properties):
properties = new_properties
update_properties()
func update_properties():
if 'velocity' in properties:
linear_velocity = properties['velocity']
if 'mass' in properties:
mass = properties.mass
func use():
bounce()
func bounce():
linear_velocity.y = 10