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

ConvexPolygonShape3D generates errors each time the points array changes. #70402

Closed
Chaosus opened this issue Dec 21, 2022 · 0 comments · Fixed by #70403
Closed

ConvexPolygonShape3D generates errors each time the points array changes. #70402

Chaosus opened this issue Dec 21, 2022 · 0 comments · Fixed by #70403

Comments

@Chaosus
Copy link
Member

Chaosus commented Dec 21, 2022

Godot version

63f95c0

System information

Windows 11

Issue description

Using the following code:

extends StaticBody3D

@onready var shape_3d = $CollisionShape3D

func _ready():
	var convex_shape = ConvexPolygonShape3D.new()
	var points = PackedVector3Array()
	
	points.append(Vector3(0, 0, 0))
	points.append(Vector3(1, 0, 0))
	points.append(Vector3(0, 0, 1))
	points.append(Vector3(1, 0, 1))
	
	convex_shape.points = points
	shape_3d.shape = convex_shape

produces the correct result:

image

but generates unnecessary errors:

image

ERROR: Condition "p_new_capacity < capacity" is true.
   at: OAHashMap<unsigned __int64,int,struct HashMapHasherDefault,struct HashMapComparatorDefault<unsigned __int64> >::)
ERROR: Condition "p_new_capacity < capacity" is true.
   at: OAHashMap<unsigned __int64,int,struct HashMapHasherDefault,struct HashMapComparatorDefault<unsigned __int64> >::)

Steps to reproduce

Check the attached project.

Minimal reproduction project

convex_polygon_test.zip

@Chaosus Chaosus added this to the 4.0 milestone Dec 21, 2022
@Chaosus Chaosus moved this to To Assess in 4.x Priority Issues Dec 21, 2022
@Chaosus Chaosus moved this from To Assess to Todo in 4.x Priority Issues Dec 21, 2022
Repository owner moved this from Todo to Done in 4.x Priority Issues Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant