Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native codegen internal lowering failure #1558

Closed
jackTabsCode opened this issue Dec 6, 2024 · 1 comment · Fixed by #1612
Closed

Native codegen internal lowering failure #1558

jackTabsCode opened this issue Dec 6, 2024 · 1 comment · Fixed by #1612
Assignees
Labels
bug Something isn't working

Comments

@jackTabsCode
Copy link

jackTabsCode commented Dec 6, 2024

Sorry for the undescriptive title, I'm not sure what other information to provide other than the code, and the error!

image
	function AABB:worldBoundingBox(cf, size)
		local halfSize = size * 0.5
		local c1 = cf:VectorToWorldSpace(Vector3.new(halfSize.X, halfSize.Y, halfSize.Z))
		local c2 = cf:VectorToWorldSpace(Vector3.new(-halfSize.X, halfSize.Y, halfSize.Z))
		local c3 = cf:VectorToWorldSpace(Vector3.new(-halfSize.X, -halfSize.Y, halfSize.Z))
		local c4 = cf:VectorToWorldSpace(Vector3.new(-halfSize.X, -halfSize.Y, -halfSize.Z))
		local c5 = cf:VectorToWorldSpace(Vector3.new(halfSize.X, -halfSize.Y, -halfSize.Z))
		local c6 = cf:VectorToWorldSpace(Vector3.new(halfSize.X, halfSize.Y, -halfSize.Z))
		local c7 = cf:VectorToWorldSpace(Vector3.new(halfSize.X, -halfSize.Y, halfSize.Z))
		local c8 = cf:VectorToWorldSpace(Vector3.new(-halfSize.X, halfSize.Y, -halfSize.Z))
		local max = Vector3.new(math.max(c1.X, c2.X, c3.X, c4.X, c5.X, c6.X, c7.X, c8.X), math.max(c1.Y, c2.Y, c3.Y, c4.Y, c5.Y, c6.Y, c7.Y, c8.Y), math.max(c1.Z, c2.Z, c3.Z, c4.Z, c5.Z, c6.Z, c7.Z, c8.Z))
		local min = Vector3.new(math.min(c1.X, c2.X, c3.X, c4.X, c5.X, c6.X, c7.X, c8.X), math.min(c1.Y, c2.Y, c3.Y, c4.Y, c5.Y, c6.Y, c7.Y, c8.Y), math.min(c1.Z, c2.Z, c3.Z, c4.Z, c5.Z, c6.Z, c7.Z, c8.Z))
		return max - min
	end

I've also attached the whole file.
aabb.luau.zip

@jackTabsCode jackTabsCode added the bug Something isn't working label Dec 6, 2024
@vegorov-rbx vegorov-rbx self-assigned this Dec 6, 2024
@vegorov-rbx
Copy link
Collaborator

Thank you for the report, we have a good idea on why this is failing and will work on a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants