From f8749e08e083f87d1d523b5faa0498787a7a810d Mon Sep 17 00:00:00 2001 From: Rob Luppi Date: Mon, 5 Oct 2026 14:36:02 -0400 Subject: [PATCH] Changing #by_ptr to a pointer to avoid potential bugs when copying the HullData struct #7612 In the example given in #7612 the issue was caused by the lines box_hull2 := b3d.MakeBoxHull(1, 1, 1) b3d.Shape_SetHull(box_shape, box_hull2.base) There is a note about potential errors during copy in the box3d code that seems to be causing the issue /// A convex hull. /// @note This data structure has data hanging off the end and cannot be directly copied. typedef struct b3HullData update to include Shape_SetMesh as well --- vendor/box3d/box3d.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/box3d/box3d.odin b/vendor/box3d/box3d.odin index f5b517f6a..a9b828dff 100644 --- a/vendor/box3d/box3d.odin +++ b/vendor/box3d/box3d.odin @@ -1089,12 +1089,12 @@ foreign lib { // Allows you to change a shape to be a hull or update the current hull. // This does not modify the mass properties. // @see Body_ApplyMassFromShapes - Shape_SetHull :: proc(shapeId: ShapeId, #by_ptr hull: HullData) --- + Shape_SetHull :: proc(shapeId: ShapeId, hull: ^HullData) --- // Allows you to change a shape to be a mesh or update the current mesh. // This does not modify the mass properties. // @see Body_ApplyMassFromShapes - Shape_SetMesh :: proc(shapeId: ShapeId, #by_ptr meshData: MeshData, scale: Vec3) --- + Shape_SetMesh :: proc(shapeId: ShapeId, meshData: ^MeshData, scale: Vec3) --- // Get the maximum capacity required for retrieving all the touching contacts on a shape Shape_GetContactCapacity :: proc(shapeId: ShapeId) -> c.int ---