[Script] Disable physics?

Joined
Oct 29, 2020
Messages
2
Reactions
0
Is it possible to do the same thing as the physics object>physics button does via script, given an atom?
I'm writing a script that's meant to create some atoms and I'd like to disable physics at least, ideally copy the physics and collision states from a given (source) atom.
 
You can do that with triggers no problem in the physics category : )

And through script, you can do whatever the frak you want by using the storables.
Example for controlling the global lighting:

C#:
SuperController.singleton.GetAtomByUid("CoreControl").GetStorableByID("GlobalLighting").GetFloatParamValue("camExposure");
SuperController.singleton.GetAtomByUid("CoreControl").GetStorableByID("GlobalLighting").SetFloatParamValue("camExposure",1f);

In the end, your process is: modify a scene > modify settings> save scene > look at json what are the ids > get the storable through code and edit them.
 
Back
Top Bottom