Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | musa |
Hello, i am making a simple paint game using line 2d, i tried to add a texture to the line 2d using
activeLine.texture = selected_texture
where the selected texture is just an image loaded using load() function.
Everything is working as expected but when i draw, the images that come out in the line
have a strong blue tint that is not present in the original image.
Here’s complete code logic -
activeLine = Line2D.new()
add_child(activeLine)
activeLine.texture = selected_texture
activeLine.texture_mode = Line2D.LINE_TEXTURE_TILE
activeLine.joint_mode = Line2D.LINE_JOINT_ROUND
activeLine.end_cap_mode = Line2D.LINE_CAP_ROUND
activeLine.begin_cap_mode = Line2D.LINE_CAP_ROUND
activeLine.width = 30.0
if event is InputEventScreenDrag:
if activeLine:
activeLine.add_point(get_local_mouse_position())
The repeat is enabled for the texture and it is getting repeated as expected.please check the screenshot below.
original texture image as well as usage screenshot -
https://drive.google.com/drive/folders/18sspiubibCAVNUHgMTyXGij2P4CYbL3x