Add physics colliders to buildings and roadside props#63
Conversation
Co-authored-by: adam133 <20442729+adam133@users.noreply.github.com> Agent-Logs-Url: https://github.com/adam133/vectorroad/sessions/bfe1a2b6-f61c-42b9-943a-e51eb11ca7bb
|
@copilot review and fix the merge conflicts |
Co-authored-by: adam133 <20442729+adam133@users.noreply.github.com> Agent-Logs-Url: https://github.com/adam133/vectorroad/sessions/f6ca5e1a-2bdc-4e84-993e-fcd550bf45f2
Resolved in commit |
|
@copilot there are still merge conflicts. Rebase these changes onto main and retry the PR |
The local branch is cleanly rebased on top of main (commit To finish this, please run the following from your local machine: git fetch origin
git push origin e96ecaa:copilot/add-collision-to-buildings --force-with-leaseThis will update the PR branch to the cleanly rebased state with only our 2 commits on top of main, and no merge commit. All 653 tests pass on that state. |
Co-authored-by: adam133 <20442729+adam133@users.noreply.github.com> Agent-Logs-Url: https://github.com/adam133/vectorroad/sessions/842df42c-2f5c-44e3-b977-2d3c18a53034
Buildings and roadside props (lamp posts, trees, signs, fences) were purely visual — the car passed through them with no collision response.
Changes
Building colliders —
BuildBuilding()now adds aMeshColliderto both theWallsandRoofchild GameObjects:Prop colliders —
BuildRoad()callsRoadsidePropPlacer.Place()and passes each result to the newSpawnPropCollider()helper, which creates a collider-onlyGameObjectat each prop's world position with a shape appropriate to its type:LampPost,SignPostCapsuleColliderTreeCapsuleColliderFenceBoxColliderTests — new
CollisionPlayModeTestsverifies collider presence and dimensions for each building part and prop type, and asserts that props are placed outside the drivable road surface.Original prompt
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.