Fix incorrect class_name declaration in 2D physics tests demo (#1188)

This commit is contained in:
Hugo Locurcio
2025-04-14 22:51:18 +02:00
committed by GitHub
parent 9db52662cb
commit b06917acaa
5 changed files with 8 additions and 7 deletions

View File

@@ -1,6 +1,5 @@
extends RigidBody3D
class_name PickupAbleBody3D
extends RigidBody3D
var highlight_material : Material = preload("res://shaders/highlight_material.tres")
var picked_up_by : Area3D
@@ -9,6 +8,7 @@ var closest_areas : Array
var original_parent : Node3D
var tween : Tween
# Called when this object becomes the closest body in an area
func add_is_closest(area : Area3D) -> void:
if not closest_areas.has(area):

View File

@@ -1,6 +1,6 @@
@tool
extends Area3D
class_name PickupHandler3D
extends Area3D
# This area3D class detects all physics bodys based on
# PickupAbleBody3D within range and handles the logic
@@ -24,6 +24,7 @@ var closest_body : PickupAbleBody3D
var picked_up_body: PickupAbleBody3D
var was_pickup_pressed : bool = false
# Update our detection range.
func _update_detect_range() -> void:
var shape : SphereShape3D = $CollisionShape3D.shape