Two collision shapes are visible despite having only one CollisonShape2D node.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jhyatt
:warning: Old Version Published before Godot 3 was released.

In my project I have a player which consists of a Rigidbody2D, a child Sprite node, and a child CollisionShape2D node set to a rectangular shape.

enter image description here

When I run my game with visible collision shapes enabled I expect to see only one rectangular collision shape. It appears there are actually two collision shapes, as seen in the following image.

enter image description here

Just to see if it would make any difference I changed the collision shape to a circle but the issue remained.

enter image description here

Has anyone else experienced this issue? I’ve been searching for a solution but haven’t come across the answer yet.

Thank you for any input.

Is this 2.1.3?


There was an issue (not sure if solved or not) about shapes not removed under certain conditions but only Shapes, not CollisionShapes (the ones who draw the shape).

Can you take a look at the tscn file with a text editor and check if there is something that looks wrong? (is simple to read)

eons | 2017-08-17 01:51

I’m using version 2.1.3

I’m looking at the .tscn now. However, I’m not totally sure if there is anything wrong with what I’m looking at.

I’ve posted a copy of the .tscn down below if you’re interested in taking a look at it.

[gd_scene load_steps=4 format=1]

[ext_resource path=“res://scripts/player.gd” type=“Script” id=1]
[ext_resource path=“res://sprites/spr_player_base.png” type=“Texture” id=2]

[sub_resource type=“RectangleShape2D” id=1]

custom_solver_bias = 0.0
extents = Vector2( 7, 7 )

[node name=“player” type=“RigidBody2D”]

transform/pos = Vector2( 72, 192 )
input/pickable = false
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
shapes/0/trigger = false
collision/layers = 1
collision/mask = 1
mode = 2
mass = 1.0
friction = 0.0
bounce = 0.0
gravity_scale = 0.0
custom_integrator = false
continuous_cd = 0
contacts_reported = 5
contact_monitor = true
sleeping = false
can_sleep = true
velocity/linear = Vector2( 0, 0 )
velocity/angular = 0.0
damp_override/linear = -1.0
damp_override/angular = -1.0
script/script = ExtResource( 1 )
meta = {
edit_group”: true
}

[node name=“sprite” type=“Sprite” parent=“.”]

transform/scale = Vector2( 0.1, 0.1 )
texture = ExtResource( 2 )

[node name=“collision” type=“CollisionShape2D” parent=“.”]

shape = SubResource( 1 )
trigger = false
_update_shape_index = 0

Jhyatt | 2017-08-17 03:11