From 58095b6a33465d8f0ff95b27a9beefe41fccc4b2 Mon Sep 17 00:00:00 2001 From: Zwitschi Date: Mon, 9 Nov 2026 16:53:25 +0100 Subject: [PATCH] test(vehicle): wheels are created with the physics state, and still come out zero Two measurement errors found and corrected before drawing any conclusion: - the vehicle pawn had been dropped from the map by an earlier cleanup; it is staged again - wheels are created in CreateVehicle(), i.e. when the physics state is built, so counting them in BeginPlay always read zero regardless Measured once physics exists, the count is still **0**, and the bone theory is dead: the skeleton has Wheel_FL/FR/RL/RR at indices 2-5 and every setup resolves to its bone. CreateWheels() runs only inside CreateVehicle() when PVehicleOutput is valid, so a zero count means the physics state never produced a vehicle - the problem is upstream of the wheel config, in the physics asset or the way the skeletal mesh binds it, not in the wheel setups. Also logged at the settle check: the pawn's own downward trace reports ground at Z 152 while the visible car's panels stand on a road of 366, so the pawn and the visible car may not be in the same place at all - worth checking before anything else. --- Game/GigLine/Content/Hollywood/DemoMap.umap | 4 +-- .../Content/Hollywood/Site/M_Asphalt.uasset | 2 +- .../Content/Hollywood/Site/M_Concrete.uasset | 2 +- .../Hollywood/Site/M_FacadeBanner.uasset | 2 +- .../Hollywood/Site/M_FacadeGlass.uasset | 2 +- .../Hollywood/Site/M_FacadeStone.uasset | 2 +- .../Hollywood/Site/M_FacadeStoneShadow.uasset | 2 +- .../Content/Hollywood/Site/M_Ground.uasset | 2 +- .../Hollywood/Site/M_KerbConcrete.uasset | 2 +- .../Content/Hollywood/Site/M_RoadPaint.uasset | 2 +- .../Content/Hollywood/Site/M_Stucco.uasset | 2 +- .../Content/Hollywood/Site/Terrain_DEM.uasset | 2 +- .../Hollywood/Textures/T_Asphalt_BC.uasset | 2 +- .../Hollywood/Textures/T_Asphalt_R.uasset | 2 +- .../Hollywood/Textures/T_Concrete_BC.uasset | 2 +- .../Hollywood/Textures/T_Concrete_R.uasset | 2 +- .../Textures/T_StoneAshlar_BC.uasset | 2 +- .../Hollywood/Textures/T_StoneAshlar_R.uasset | 2 +- .../Hollywood/Textures/T_Stucco_BC.uasset | 2 +- .../Hollywood/Textures/T_Stucco_R.uasset | 2 +- .../GigLine/Source/GigLine/GigLineVehicle.cpp | 26 ++++++++++++++++++- Tools/ue_build_demo_map.py | 10 +++++++ 22 files changed, 56 insertions(+), 22 deletions(-) diff --git a/Game/GigLine/Content/Hollywood/DemoMap.umap b/Game/GigLine/Content/Hollywood/DemoMap.umap index a816bf7..928635a 100644 --- a/Game/GigLine/Content/Hollywood/DemoMap.umap +++ b/Game/GigLine/Content/Hollywood/DemoMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d935a7281744b4d3a855bdb59d575265436362caa710be859d864e84c500c967 -size 790645 +oid sha256:6846baa521fda37a1fd933fbe9b35f817c021be632f266f56cd605e2fd513374 +size 791467 diff --git a/Game/GigLine/Content/Hollywood/Site/M_Asphalt.uasset b/Game/GigLine/Content/Hollywood/Site/M_Asphalt.uasset index b458a2b..02110f4 100644 --- a/Game/GigLine/Content/Hollywood/Site/M_Asphalt.uasset +++ b/Game/GigLine/Content/Hollywood/Site/M_Asphalt.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ed5dd189f01ce9881c165a40143f55fb57fa775c3cded6e85c8782639e09b3b +oid sha256:57a074d5a39fce014d7201d1f3b77d9ebd9f0cc83abef0d9c2ede21d3f48d6b3 size 10019 diff --git a/Game/GigLine/Content/Hollywood/Site/M_Concrete.uasset b/Game/GigLine/Content/Hollywood/Site/M_Concrete.uasset index 006abb3..93e6bf6 100644 --- a/Game/GigLine/Content/Hollywood/Site/M_Concrete.uasset +++ b/Game/GigLine/Content/Hollywood/Site/M_Concrete.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd0077536311dd8bdcbd08b9cf689174c6ed79c696b89e934f8767a3b4cf5ad5 +oid sha256:db060433bbc2a02620448a1ec37c6aee437dbf7ccc3cb3eb0266d0811e88db4a size 10024 diff --git a/Game/GigLine/Content/Hollywood/Site/M_FacadeBanner.uasset b/Game/GigLine/Content/Hollywood/Site/M_FacadeBanner.uasset index 26fdc1d..8a1b8f6 100644 --- a/Game/GigLine/Content/Hollywood/Site/M_FacadeBanner.uasset +++ b/Game/GigLine/Content/Hollywood/Site/M_FacadeBanner.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:acc500258b9feded2fea9ab7eab3f848866426b6d91743b0a61639aec09fe0e8 +oid sha256:3883f499044899bcc8e5e5184e5f98c815f0465315f3b8320f5984654e57cab5 size 11419 diff --git a/Game/GigLine/Content/Hollywood/Site/M_FacadeGlass.uasset b/Game/GigLine/Content/Hollywood/Site/M_FacadeGlass.uasset index 1bb874f..03c090d 100644 --- a/Game/GigLine/Content/Hollywood/Site/M_FacadeGlass.uasset +++ b/Game/GigLine/Content/Hollywood/Site/M_FacadeGlass.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa43f0e880694c4e76cefe78a2fb823aa4ab6ddca326d0ba235f70daba3ce0a7 +oid sha256:b2fb0187b4f6762846aa47501f157fe241eab22a9fcc04f7a3ac6b875122bdc7 size 11414 diff --git a/Game/GigLine/Content/Hollywood/Site/M_FacadeStone.uasset b/Game/GigLine/Content/Hollywood/Site/M_FacadeStone.uasset index e33e1fc..c772541 100644 --- a/Game/GigLine/Content/Hollywood/Site/M_FacadeStone.uasset +++ b/Game/GigLine/Content/Hollywood/Site/M_FacadeStone.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:540922ef242dbc9f502baeb0eb0615b7240d1501d400d4e3c7d1d0687f7ca5a3 +oid sha256:ef4566c9d2a39873addfc11a8e7ef4f586cfeed5c6a2ba4d480067ea3c5d5150 size 17083 diff --git a/Game/GigLine/Content/Hollywood/Site/M_FacadeStoneShadow.uasset b/Game/GigLine/Content/Hollywood/Site/M_FacadeStoneShadow.uasset index a5992a7..59076af 100644 --- a/Game/GigLine/Content/Hollywood/Site/M_FacadeStoneShadow.uasset +++ b/Game/GigLine/Content/Hollywood/Site/M_FacadeStoneShadow.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bdb18d239f7e822dd04726c401b5e7eab3a85f7480e3333873fbb0eb87d0fca9 +oid sha256:6d0962422bf14b1ddb2a04366a8f1ec44ac3ce9312aa2581570486397a28dc78 size 17113 diff --git a/Game/GigLine/Content/Hollywood/Site/M_Ground.uasset b/Game/GigLine/Content/Hollywood/Site/M_Ground.uasset index dbbd7df..7bb1544 100644 --- a/Game/GigLine/Content/Hollywood/Site/M_Ground.uasset +++ b/Game/GigLine/Content/Hollywood/Site/M_Ground.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:270d6de1acf69775eafa078cb9f271817032311965f7733ac04bed1c59a0107b +oid sha256:d52810732473b644940a0c33f36c481df72a0787a36452cbcb48f025d6f14eb4 size 10014 diff --git a/Game/GigLine/Content/Hollywood/Site/M_KerbConcrete.uasset b/Game/GigLine/Content/Hollywood/Site/M_KerbConcrete.uasset index 7cf426d..b7eab3f 100644 --- a/Game/GigLine/Content/Hollywood/Site/M_KerbConcrete.uasset +++ b/Game/GigLine/Content/Hollywood/Site/M_KerbConcrete.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d63bb7f74181cc4f7a1ad571158f355016cf19bba4409411e387f6472b6a1eec +oid sha256:3865687d51b7b24713d40056c4cc9f317d73e9e8fde2cd85cba3d033f3eae68e size 10044 diff --git a/Game/GigLine/Content/Hollywood/Site/M_RoadPaint.uasset b/Game/GigLine/Content/Hollywood/Site/M_RoadPaint.uasset index 43b23f6..0c08a92 100644 --- a/Game/GigLine/Content/Hollywood/Site/M_RoadPaint.uasset +++ b/Game/GigLine/Content/Hollywood/Site/M_RoadPaint.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3cd71016f7f4f2d92e49e969c0fb6b41afc212a96e58e94ee30a638cb220f805 +oid sha256:23c0b73cbc3e8369906b1e047bafc16a8cdd260b9db659aef06046a9caaa9a3e size 10029 diff --git a/Game/GigLine/Content/Hollywood/Site/M_Stucco.uasset b/Game/GigLine/Content/Hollywood/Site/M_Stucco.uasset index 6154a4b..460405e 100644 --- a/Game/GigLine/Content/Hollywood/Site/M_Stucco.uasset +++ b/Game/GigLine/Content/Hollywood/Site/M_Stucco.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:591eb004112af8c37d983c05d338fac880ecce6f8126739f9b24c49f81f1b315 +oid sha256:29224ed00fe5607efc8439b3e4915ccebe4fd25ad20723513ab00d7f69f94790 size 11389 diff --git a/Game/GigLine/Content/Hollywood/Site/Terrain_DEM.uasset b/Game/GigLine/Content/Hollywood/Site/Terrain_DEM.uasset index 334a759..7d1cde9 100644 --- a/Game/GigLine/Content/Hollywood/Site/Terrain_DEM.uasset +++ b/Game/GigLine/Content/Hollywood/Site/Terrain_DEM.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:391ff5ecaedb24ec73a48a2a09c385ec900a345fac442869b751add41ea53ada +oid sha256:2a426e91e8a57221701729d4714beb7c8c9556ca3440700bd93f0fa57fd1f983 size 357901 diff --git a/Game/GigLine/Content/Hollywood/Textures/T_Asphalt_BC.uasset b/Game/GigLine/Content/Hollywood/Textures/T_Asphalt_BC.uasset index 3724cad..db192f8 100644 --- a/Game/GigLine/Content/Hollywood/Textures/T_Asphalt_BC.uasset +++ b/Game/GigLine/Content/Hollywood/Textures/T_Asphalt_BC.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f040360bf06fba75529ef658e69385d4dc8bb2fc872a944be6d105f2d4337726 +oid sha256:709010f64c821ba4dc2b45afc61435a7543c4aec5bdb7c570c2db22f3325f8b6 size 70879 diff --git a/Game/GigLine/Content/Hollywood/Textures/T_Asphalt_R.uasset b/Game/GigLine/Content/Hollywood/Textures/T_Asphalt_R.uasset index 75ab547..27c999b 100644 --- a/Game/GigLine/Content/Hollywood/Textures/T_Asphalt_R.uasset +++ b/Game/GigLine/Content/Hollywood/Textures/T_Asphalt_R.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f5da9125c50e30411a76c8c02e71d81990784be7e33f6a6f3321ef941d79702 +oid sha256:6989826840117e28c57e781367780af8899ad5cbcb871c30433252703e898224 size 29011 diff --git a/Game/GigLine/Content/Hollywood/Textures/T_Concrete_BC.uasset b/Game/GigLine/Content/Hollywood/Textures/T_Concrete_BC.uasset index 386abc8..cef8a61 100644 --- a/Game/GigLine/Content/Hollywood/Textures/T_Concrete_BC.uasset +++ b/Game/GigLine/Content/Hollywood/Textures/T_Concrete_BC.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d132d7237483d4332ddfd4037188f9bc000532f3e6211ce4882d846782de658 +oid sha256:e521a43ab4320385b596a98552cac9cd987d2515278769065e323d0d290db5c7 size 58568 diff --git a/Game/GigLine/Content/Hollywood/Textures/T_Concrete_R.uasset b/Game/GigLine/Content/Hollywood/Textures/T_Concrete_R.uasset index d4c540b..5c64d82 100644 --- a/Game/GigLine/Content/Hollywood/Textures/T_Concrete_R.uasset +++ b/Game/GigLine/Content/Hollywood/Textures/T_Concrete_R.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:95d58f7bb2b736d058a1d4cd3c0143ab6a47ba23bc4c413462728401a7824015 +oid sha256:3f73dcf6f53d8ccad5b87e0807cc3b02b3126ca72ada145bbc45bccbc9b86111 size 17517 diff --git a/Game/GigLine/Content/Hollywood/Textures/T_StoneAshlar_BC.uasset b/Game/GigLine/Content/Hollywood/Textures/T_StoneAshlar_BC.uasset index 058e23b..264908f 100644 --- a/Game/GigLine/Content/Hollywood/Textures/T_StoneAshlar_BC.uasset +++ b/Game/GigLine/Content/Hollywood/Textures/T_StoneAshlar_BC.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8121ac762ccaed0e354704bc31d442672f5dacdc126f269964947b9be038b959 +oid sha256:64324292e11f9bc8e73a43dec2c37f7ac83429a4d50020d5edb8a1d808dcdb0f size 40610 diff --git a/Game/GigLine/Content/Hollywood/Textures/T_StoneAshlar_R.uasset b/Game/GigLine/Content/Hollywood/Textures/T_StoneAshlar_R.uasset index 7632fe8..ed0967d 100644 --- a/Game/GigLine/Content/Hollywood/Textures/T_StoneAshlar_R.uasset +++ b/Game/GigLine/Content/Hollywood/Textures/T_StoneAshlar_R.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1da2fdaaf90ebc747b3bad8b2f45d22200710f709aec6b97c1f01d6a50ff51ff +oid sha256:b55167f97b678cc4c4ded2fc45aa4a8a0eee84dfd8c74e5b4de0296a29d7688a size 18770 diff --git a/Game/GigLine/Content/Hollywood/Textures/T_Stucco_BC.uasset b/Game/GigLine/Content/Hollywood/Textures/T_Stucco_BC.uasset index 8fa4b06..fb2b92a 100644 --- a/Game/GigLine/Content/Hollywood/Textures/T_Stucco_BC.uasset +++ b/Game/GigLine/Content/Hollywood/Textures/T_Stucco_BC.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac2461575db3e2c258166a200c54317328a8087128d1841cd89bd7e9fcb306c6 +oid sha256:98e59ba5fbf6b47218e7ecffd9a33010be5835ac53f93b1bfad133bad97286d0 size 62746 diff --git a/Game/GigLine/Content/Hollywood/Textures/T_Stucco_R.uasset b/Game/GigLine/Content/Hollywood/Textures/T_Stucco_R.uasset index 325bed6..c34903b 100644 --- a/Game/GigLine/Content/Hollywood/Textures/T_Stucco_R.uasset +++ b/Game/GigLine/Content/Hollywood/Textures/T_Stucco_R.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f98d47ef27af9effcf5bed4b2a06fbfc13d8d1e04600bab75d5284c455da14c +oid sha256:a453143fb7cb0149f5e5c0a0f94c225bf8dce84af7e90e318380a878e83d2fdc size 17541 diff --git a/Game/GigLine/Source/GigLine/GigLineVehicle.cpp b/Game/GigLine/Source/GigLine/GigLineVehicle.cpp index ecf9069..943a4d8 100644 --- a/Game/GigLine/Source/GigLine/GigLineVehicle.cpp +++ b/Game/GigLine/Source/GigLine/GigLineVehicle.cpp @@ -233,8 +233,25 @@ void AGigLineVehicle::BeginPlay() BodyComp->bHiddenInGame ? 1 : 0, *BodyComp->Bounds.BoxExtent.ToString()); } + // Name the bones and check each setup against them: Chaos silently creates no wheel + // when a setup's bone is not on the mesh, which is how four setups produced zero + // wheels without a warning. + if (USkeletalMeshComponent* Body = GetMesh()) + { + TArray Bones; + Body->GetBoneNames(Bones); + UE_LOG(LogTemp, Warning, TEXT("GigLine vehicle: %d bones, e.g. %s"), + Bones.Num(), + Bones.Num() > 0 ? *Bones[FMath::Min(1, Bones.Num() - 1)].ToString() : TEXT("none")); + for (const FChaosWheelSetup& Setup : Movement->WheelSetups) + { + UE_LOG(LogTemp, Warning, TEXT("GigLine vehicle: setup bone '%s' index %d"), + *Setup.BoneName.ToString(), Body->GetBoneIndex(Setup.BoneName)); + } + } UE_LOG(LogTemp, Warning, - TEXT("GigLine vehicle: %d wheel objects after register, torque %.0f"), + TEXT("GigLine vehicle: %d wheel objects at BeginPlay (wheels are created later, " + "with the physics state), torque %.0f"), Movement->Wheels.Num(), Movement->EngineSetup.MaxTorque); } UE_LOG(LogTemp, Warning, TEXT("GigLine vehicle: spawned at (%.0f, %.0f, %.0f), %d wheel setups"), @@ -285,6 +302,13 @@ void AGigLineVehicle::Tick(float DeltaSeconds) if (!bSettleReported && SettleElapsed > 3.0f) { bSettleReported = true; + if (const UChaosWheeledVehicleMovementComponent* Wheeled = + Cast(GetVehicleMovementComponent())) + { + UE_LOG(LogTemp, Warning, + TEXT("GigLine vehicle: %d wheel objects once physics exists"), + Wheeled->Wheels.Num()); + } if (UWorld* World = GetWorld()) { FHitResult Hit; diff --git a/Tools/ue_build_demo_map.py b/Tools/ue_build_demo_map.py index fed09a8..885c919 100644 --- a/Tools/ue_build_demo_map.py +++ b/Tools/ue_build_demo_map.py @@ -700,6 +700,16 @@ def build(): vehicle_origin = unreal.Vector(-12950.0, -900.0, 367.0) vehicle_rotation = unreal.Rotator(pitch=0.0, yaw=0.0, roll=0.0) + # The physics pawn: Chaos needs it even while the visible car is a set of plain + # panels, because that is the component that owns the wheels and the movement. + vehicle_class = unreal.load_class(None, "/Script/GigLine.GigLineVehicle") + if vehicle_class: + pawn = spawn(vehicle_class, vehicle_origin, "Demo_Vehicle_Sedan") + log(f"staged: Demo_Vehicle_Sedan ({'ok' if pawn else 'FAILED'})") + else: + log("staged: Demo_Vehicle_Sedan skipped - class not found") + + panel_systems = ( "SM_Vehicle_Body", "SM_Vehicle_Trim",