#Idiomatic way to store config values

8 messages · Page 1 of 1 (latest)

wicked sentinel
#

I have a third person camera controller component that holds pitch, yaw and distance values. I also need to hold config values like max/min yaw and rotation speed etc. What's the idiomatic way to store that? In the same component or in a separate config component?

quiet geyser
#

Seperate config component is better, so then change detection can differentiate

#

Being able to check "did the config change" is a reasonable question, and so is "did the camera position change"

wicked sentinel
#

Ok, thanks. I do have a config component now but my queries go very long so it got me wondering

quiet geyser
#

The WorldQuery and SystemParam derive macros can be really handy 🙂

wicked sentinel
#

Another similar question; Should the camera controller components be on the same player entity where the mesh etc is? Or in their own entity?

quiet geyser
#

I tend to like having them on the same player entity

#

Just to avoid accidental desyncs