Integrate five Meshy apparatus with fitted soul poses and anchored restraints

This commit is contained in:
JariKo
2026-10-29 16:30:06 +02:00
parent 4a8bcd13f1
commit 4ca0c2a899
80 changed files with 1584 additions and 52 deletions
+8 -1
View File
@@ -26,13 +26,20 @@ func build(root):
var collider=CollisionShape3D.new()
collider.shape=mesh.get_meta("walk_collision_shape") if mesh.has_meta("walk_collision_shape") else mesh.mesh.create_trimesh_shape()
body.add_child(collider)
collider.shape.backface_collision=true
if collider.shape is ConcavePolygonShape3D:collider.shape.backface_collision=true
func rebuild(stations):
outlines.clear()
for s in stations:
for mesh in s.device.find_children("*","MeshInstance3D",true,false):
if not mesh.has_node("MeshWalkingCollider"):continue
var points=PackedVector2Array()
var collider=mesh.get_node("MeshWalkingCollider").get_child(0) as CollisionShape3D
if collider.shape is ConvexPolygonShape3D:
# The route planner must use the same hull as the swept capsule.
for v in collider.shape.points:
var point=mesh.global_transform*v;points.append(Vector2(point.x,point.z))
if points.size()>2:outlines.append(Geometry2D.convex_hull(points))
continue
var faces=mesh.mesh.get_faces()
for i in range(0,faces.size(),3):
var a=mesh.global_transform*faces[i];var b=mesh.global_transform*faces[i+1];var c=mesh.global_transform*faces[i+2]