Bullethole scales and i dont know why

Godot Version

4.3

Question

i tried to make an fps and wanted to add bulletholes when you shoot, the bulletholes are circles, but if you shoot, the bulletholes are stretched and bigger, and i want them to be at its original size, also the bullethole is exact at the same position as the wall/ground wich can make some weird texture visuals

func fire() -> void:
	# While firing, apply continuous shake
	shake_intensity = 0.5  # Full intensity shake during fire

	# Apply shake (rotation)
	camera.rotation = lerp(camera.rotation, Vector3(
		randf_range(MAX_CAMERA_SHAKE * shake_intensity, -MAX_CAMERA_SHAKE * shake_intensity),
		randf_range(MAX_CAMERA_SHAKE * shake_intensity, -MAX_CAMERA_SHAKE * shake_intensity),
		0), 0.5)

	# Handle shooter collision and damage
	if shooter.is_colliding():
		var target = shooter.get_collider()
		if target:
			#target.health -= gun_damage
			create_bullet_hole()

func create_bullet_hole() -> void:
	var bulletHoleNode = BULLET_HOLE.instantiate()
	shooter.get_collider().add_child(bulletHoleNode)
	bulletHoleNode.global_position = shooter.get_collision_point()
	bulletHoleNode.look_at(bulletHoleNode.global_position + shooter.get_collision_normal(), Vector3.UP)

My best guess here is that because you are adding the bullet holes as a child of the object that the bullet hit, if the object has a scale applied that will also be applied to the bullet hole.

I think bullet holes in general can be more complex an entity than expected, but I would approach this with an additional layer/scene that contained my bullet holes. You could use the collider information to get the position and angle of the hole, but then instantiate the hole in a separate node/scene/layer.

Having access then to all the bullet holes in one place, you could also then use that to control the maximum number of bullet holes, and queue_free them or fade them out after a certain amount of time. In fact you could have a pool of bullet holes that you cycle through.

Hope that helped in some way.

it is helpful, there where more problems, but they are already solved, in my latest reply you can see all problems and answers

1 Like