Table of Contents

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.

[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)

Rotation/Scaling Origin

[JsonProperty]
public Vec3f Origin

Field Value

Vec3f

Rotate (Optional)

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]
public bool Rotate

Field Value

bool

Rotation (Optional)

Rotation in degrees

[JsonProperty]
public Vec3f Rotation

Field Value

Vec3f

ScaleXYZ (Optional)

Scaling per axis

[JsonProperty]
public Vec3f ScaleXYZ

Field Value

Vec3f

Translation (Optional)

Offsetting

[JsonProperty]
public Vec3f Translation

Field Value

Vec3f

Properties

Scale (Optional)

Sets the same scale of an object for all axes.

[JsonProperty]
public float Scale { set; }

Property Value

float