#Camera doesn't rotate to left and right sides.

25 messages · Page 1 of 1 (latest)

hollow beacon
#

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?

rose garnet
#

Try to change the order of the arguments in clamp. I had the same problem and it worked for me

hollow beacon
#

How I can fix this error?

rose garnet
#

Did you solve your camera not rotating problem

hollow beacon
rose garnet
rose garnet
# hollow beacon Ok

And also replace clamp(camera.rotation.x, -PI/2, PI/2) with clamp(-PI/2., PI/2., camera.rotation.x)

hollow beacon
hollow beacon
rose garnet
#

For the effect

#

I get it

hollow beacon
rose garnet
#

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

hollow beacon
rose garnet
#

And can you show me your shader please

hollow beacon
#

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.

hollow beacon
hollow beacon
rose garnet
rose garnet