#Smooth camera rotation

22 messages · Page 1 of 1 (latest)

tawdry igloo
#

(Video is why second script isn't working for me)

lilac heath
#

option 1 you could make a cooldown timer on the player being allowed to rotate the camera. So they never can rotate while a rotation is already happening

option 2 save the finished rotation transform to a var, and rotate from that if it's not set to null. Set the var to null when the rotation is finished

tawdry igloo
#

something along these lines maybe

#

it is giving me errors tho

#

This seems to be working altough it is horrendous code probably

#

quick question why cant i declare somehting like this?

#

it wont let me run it

tawdry igloo
#

oh shit

lilac heath
#

@onready var would work I think

tawdry igloo
lilac heath
# tawdry igloo

not horrendous at all. You could break it into its own function and handle the left and right turns presses in one func tho, if you felt like it

tawdry igloo
#

this is my final code after some cleanup and using the @onready at the top to get rid of some if statements

#

This is unrelated but this error is crashing my playtest sometimes and it's really annoying any work around it?

#

Lets just say my gpu is not in his best shape

lilac heath
#

is that related to this code? I've never seen that one

tawdry igloo
#

no is a general issue with godot

#

it can happen even in an empty scene

lilac heath
#

I can't help with that one, but maybe you can make a new topic so that the issue is more visible to someone who can