#How do I modify a clamp?

23 messages · Page 1 of 1 (latest)

ionic parrot
#

I'm trying to Modify the current value of Max_Fov as you can see here but its not allowing me to.
If I try to change it using Max_Fov.value += 1 it just pops out an error everytime the function runs. Im not sure how to modify it then, Does anyone have any idea how to Modify the value correctly? Any help is GREATLY appreciated!

royal coral
#

how are verifying that Max_Fov += 1 isn't working?

royal coral
#

also, i believe when you assign Max_Fox a value via clamp in the declaration, it's no different than just saying var Max_Fox = 75.0. basically, i don't think any issues you're experiencing are related to the clamp function.

ionic parrot
#

hmm.

#

So what appears to be the issue then?

royal coral
#

oh wait, does anything actually affect the camera's fov? like does anything relate the Max_Fov variable to anything else?

ionic parrot
royal coral
#

oh gotcha, so i think you'll just have to write some code to modify the camera's fov based on user input. one way to do that would be to add a $Camera3D.fov = Max_Fov line, which would just directly set the camera's fov to whatever Max_Fov is

ionic parrot
#

wait I cannot modify the fov. No error is appearing and yet the FOV hasn't changed

#

Maybe I cannot modify the camera itself.

royal coral
#

hmmmmmm, i swear i've done something like this recently, lemme check real quick

ionic parrot
#

The Rigidbody is the Parent of the camera just so you know if that can help

royal coral
#

so if you have the code exactly as it is in the picture but replace Max_Fov += 1 with $Camera3D.fov += 1 in line 25, what happens?

ionic parrot
#

Nothing Happens.

royal coral
#

what values are printed?

ionic parrot
#

Im printing none as of now

#

but I printed the fov and it stays the same

royal coral
#

can you run it again and send a pic of what it's printing?

ionic parrot
#

Its just not letting me modify it.

#

Its working!

royal coral
#

hahaha nice!

ionic parrot
#

THANK YOU SO MUCH!!

#

I WAS DEALING WITH THIS PROBLEM FOR A VERY LONG TIME DUDE THANK YOU SO MUCH