Hi everyone,
Sorry, no playground. I have seen this crash the first time now. In a game, during enemy turn, lots of raycasts fired within a frame. Cannot reproduce ![]()
Crash happens here: Babylon.js/packages/dev/core/src/Physics/v2/Plugins/havokPlugin.ts at 7ddc62e2ee59b2f034db81c73e04f3804cbc7222 · BabylonJS/Babylon.js · GitHub
// Extract:
public raycast(from: Vector3, to: Vector3, result: PhysicsRaycastResult | Array<PhysicsRaycastResult>, query?: IRaycastQuery): void
//(...)
const worldRegion = query?.ignoreBody?._pluginData?.worldRegion ?? this._worldRegions[0];
const offset = worldRegion.floatingOrigin;
I do not use the query parameter so I would think the crash is caused by this._worldRegions[0]. I swear I do not touch _worldRegions. I do not even know what this feature is.
Are there some indirections through which I could accicentally clear the array?
Best wishes
Joe