feat: 切换至滚动阻力运行模型并更新资产、编辑器与验证
- 物理规则:现行模型仅保留滚动阻力耗能与恢复系数碰撞,风力、空气阻力、静摩擦、动摩擦不再参与运行;确认三球质量 60/330/约890 kg 及水密度、流阻参数 - 定向加速改为真实顶面接触触发的一次性 +5 m/s 速度事件,模型新增渐进式 U 形导槽出口 - 更新球体、滑槽、水/冰/墙、球洞模型与 storybook 目录、物理、实体配置 - 工坊摆放、编辑器、运行适配与检查脚本同步;删除过时的 baseline 三组检查 - 新增谜题设计参考文档、关卡草稿与本轮实验产物
This commit is contained in:
@@ -34,7 +34,7 @@ func add_colliders(node: Node, kind: String) -> void:
|
||||
body.collision_mask = 2
|
||||
body.set_meta("piece_type",kind)
|
||||
var material := PhysicsMaterial.new()
|
||||
material.friction = .25 if kind=="goal_hole" else 1.0 # native pair uses min.
|
||||
material.friction = 0.0
|
||||
material.bounce = 0.0
|
||||
body.physics_material_override = material
|
||||
var collider := CollisionShape3D.new()
|
||||
@@ -60,16 +60,13 @@ func create_ball() -> RigidBody3D:
|
||||
body.radius = float(data["radius"])
|
||||
body.mass = float(profile["massKg"])
|
||||
body.inertia = Vector3.ONE * (0.4 * body.mass * body.radius * body.radius)
|
||||
body.drag_coefficient = float(profile["dragCoefficient"])
|
||||
body.air_density = float(physics["airDensity"])
|
||||
body.mu_static = float(pair["staticFriction"])
|
||||
body.mu_dynamic = float(pair["dynamicFriction"])
|
||||
body.rolling_resistance = float(pair["rollingResistance"])
|
||||
body.collision_layer = 2
|
||||
body.collision_mask = 3
|
||||
var material := PhysicsMaterial.new()
|
||||
material.friction = body.mu_static
|
||||
material.friction = 0.0
|
||||
material.bounce = float(pair["restitution"])
|
||||
body.base_bounce = material.bounce
|
||||
body.physics_material_override = material
|
||||
var shape := SphereShape3D.new()
|
||||
shape.radius = body.radius
|
||||
@@ -100,7 +97,7 @@ func create_box(size: Vector3, location: Vector3, color: Color, solid := true) -
|
||||
root.collision_layer = 1
|
||||
root.collision_mask = 2
|
||||
var pm := PhysicsMaterial.new()
|
||||
pm.friction = 1.0
|
||||
pm.friction = 0.0
|
||||
root.physics_material_override = pm
|
||||
return root
|
||||
|
||||
@@ -143,7 +140,8 @@ func create_goal_hole(location: Vector3) -> Node3D:
|
||||
return create_piece("goal_hole",location)
|
||||
|
||||
func crossed_goal(previous: Vector3, current: Vector3, goal: Vector3, radius: float) -> bool:
|
||||
var height: float=goal.y-float(catalog["goal_hole"].depth)
|
||||
# This older straight bore has its throat entrance at the rim.
|
||||
var height: float=goal.y
|
||||
if previous.y<=height or current.y>height:return false
|
||||
var ratio: float=(previous.y-height)/maxf(previous.y-current.y,.000001)
|
||||
var crossing: Vector3=previous.lerp(current,ratio)
|
||||
|
||||
Reference in New Issue
Block a user