Class ModelTransformNoDefaults
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
Controls the transformations of 3D shapes. Note that defaults change depending on where this class is used. Open in GitHub
[DocumentAsJson]
[JsonObject(MemberSerialization.OptIn)]
public class ModelTransformNoDefaults
- Inheritance
-
ModelTransformNoDefaults
- Derived
Examples
Use '.tfedit' in game to help customize these values, just make sure to copy them into your json file when you finish.
"tpHandTransform": {
"translation": {
"x": -0.87,
"y": -0.01,
"z": -0.56
},
"rotation": {
"x": -90,
"y": 0,
"z": 0
},
"origin": {
"x": 0.5,
"y": 0,
"z": 0.5
},
"scale": 0.8
},
Fields
Origin (Optional) (Default: 0.5, 0.5, 0.5)
Rotation/Scaling Origin
[JsonProperty]
[DocumentAsJson("Optional", "0.5, 0.5, 0.5", false)]
public FastVec3f Origin
Field Value
- FastVec3f
Rotate (Optional) (Default: True)
For Gui Transform: Whether to slowly spin in gui item preview For Ground Transform: Whether to apply a random rotation to the dropped item No effect on other transforms
[JsonProperty]
[DocumentAsJson("Optional", "True", false)]
public bool Rotate
Field Value
Rotation (Optional)
Rotation in degrees
[JsonProperty]
[DocumentAsJson("Optional", "", false)]
public FastVec3f Rotation
Field Value
- FastVec3f
Scale (Optional)
Sets the same scale of an object for all axes.
[JsonProperty]
[DocumentAsJson("Optional", "", false)]
public float Scale { set; }
Field Value
ScaleXYZ (Optional) (Default: 1, 1, 1)
Scaling per axis
[JsonProperty]
[DocumentAsJson("Optional", "1, 1, 1", false)]
public FastVec3f ScaleXYZ
Field Value
- FastVec3f
Translation (Optional)
Offsetting
[JsonProperty]
[DocumentAsJson("Optional", "", false)]
public FastVec3f Translation
Field Value
- FastVec3f