godot icon indicating copy to clipboard operation
godot copied to clipboard

Holding Shift while moving vertices in CollisionPolygon2D crashes Godot

Open Braveo opened this issue 2 years ago • 1 comments

Godot version

3.5.stable.mono

System information

Windows 10, GLES2, i5 11600, RTX 3060 TI

Issue description

Essentially, I was working on the collision for the player, and used a CollisionPolygon2D. I was going to add a new vertex and drag it along, but I wanted it to not snap to pixels so I hit alt and shift and different buttons to figure out if one of them disables snap.

Essentially, hitting shift while adding a vertex in polygon crashes.

https://user-images.githubusercontent.com/23423003/183262556-10ed20d9-9e7a-450b-90f7-94a3677e9078.mp4

Steps to reproduce

  1. Create a 2D scene and a KinematicBody2D
  2. Create a CollisionShape2D as a child of KinematicBody2D, and have it be any shape. (edit: some shapes seem to work and others not for some reason. Circle doesn't work as far as I've tried.)
  3. Create a CollisionPolygon2D as a child of KinematicBody2D, and start adding vertices.
  4. Add a vertex between two vertices but do not release the left click. Start holding shift right after.
  5. Move around the vertex and it usually ends up crashing.

https://user-images.githubusercontent.com/23423003/183262764-49e932a2-f92c-46ab-9a55-0d2fbf70e81c.mp4

Minimal reproduction project

GD3.5-Reproduction has the reproduction scene I have for this issue: GD3.5-Reproduction.zip

GD-TowerGame is what I was working on when the issue occurred, located in res://Objects/Player.tscn GD-TowerGame.zip

Braveo avatar Aug 06 '22 19:08 Braveo

Out of curiosity, can you reproduce this in 3.4.x?

Calinou avatar Aug 07 '22 07:08 Calinou

I reproduced it in 3.4.5 and fresh master build, 100% reliably including a circle CollisionShape2d.

Edit: It seems it only happens on the very first move of a newly created vertex, as soon as you stop pressing left click then it doesn't reproduce.

pulawskig avatar Aug 07 '22 11:08 pulawskig