Jump to content

GUI OptionsDlg: Camera Viewing Distance


Recommended Posts

I made a simple script that will give you the option to choose the camera viewing distance within the optionsDlg GUI. When I change this in the options I see in the console that was changed, but when I close the game and open it again, View Distance returns to default. Already tried tried several ways I was unsuccessful.

Link to post
Share on other sites

You need to store the value as a preference that gets saved in the config files, like the values in the option menu, they start with &pref like those: https://github.com/GarageGames/Torque3D/blob/561f010f2e6411d8253d23f0cfcff794e81f60bf/Templates/Full/game/core/scripts/client/defaults.cs#L28

Only they are saved to a file when you set them in the game. Maybe you forgot to write into the script a function that saves the values to a config file, happened to me before, I just force save all the values when the option dialog is closed so it never forgets to save the changes.


You also need to make sure to use the &pref value instead of anything else when setting the camera view distance for the first time.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...