I have room scene and player scene. Player script works. But camera doesn't rotating to left and right sides. And also camera doesn't follow to player coordinates. Player have viewport and Sprite2D. It's need to Color Palette limiter shader works. How I can fix the problem?
#Camera doesn't rotate to left and right sides.
25 messages · Page 1 of 1 (latest)
Try to change the order of the arguments in clamp. I had the same problem and it worked for me
How I can fix this error?
Did you solve your camera not rotating problem
Camera doesn't rotating because player have a viewport. When I start the game I see this error:"setup _local_to_scene:Condition"proxy.is_valid() "is true. Scene/main/viewport.cpp:89@setup_local_to_scene() ". What this error means?
I don't know you should be asking this in #networking
And also replace clamp(camera.rotation.x, -PI/2, PI/2) with clamp(-PI/2., PI/2., camera.rotation.x)
How I can transfer image from camera to sprite2d? Viewport doesn't work correctly.
Why are you using a sprite 2d ?
For the effect
I get it
Because color pallete limiter shader have a canvas type.
You need to add a script to your subviewport
extends Sprite2d
@onready var subViewport = $"path to your viewport"
func _process(delta):
var texture = subviewport.get_texture()
self.material.set_shader_param("name of your parameter",texture)
This script is for your sprite2d
Your path is wrong, it's neck not nek
And can you show me your shader please
I don't know why camera doesn't works with viewport. If I delete viewport, camera starts rotating to left and right sides. And follow to player coordinates.
Sorry, I didn't have time to use your help. Why did you are delete a message? I'm so sorry if I do something wrong
I suggested to you to use SREEN_TEXTURE but it doesn't show transparent objects
And about your camera not following the player, you could try to change it's position in the code