Add a paramtype2 that applies a transformation matrix out of a predefined list #15650
Labels
@ Client / Audiovisuals
Feature request
Issues that request the addition or enhancement of a feature
@ Script API
Problem
Sometimes modders want to
Solutions
Introduce the ability to specify arbitrary transformation matrices for nodes.
Allow specifying a list and have a
paramtype2
that chooses between them.This could look as follows:
For people who want colors
We would add a
paramtype2 = "colortransform"
, though how many bits to use is not clear.Perhaps multiple variants:
If this is considered too inflexible we would need to revive #11019 or wait for SSCSM to fix this (as always).
Implications on mesh building:
A simple and safe way that works for a start is to turn every node that uses this (particularly
drawtype = "normal"
) into a "standalone" node (likeallfaces
).We probably want to disallow it for
(flowing)liquid
.Thinking further we could try to handle it more generally, so that mere 90° rotations do not cause duplicate faces.
Implications on culling and such:
Using this to make a node unreasonably larger or offset (e.g. move up by 32 nodes) should simply be declared unsupported.
Implications on raytracing:
Should work if you throw the math at it.
(however since we don't modify collision or selection boxes we won't need this?)
Implications on collision or selection boxes:
None.
Alternatives
this is literally the ideal api
(credit to @appgurueu for the original idea)
Additional context
this would obsolete/solve:
scale
paramtype2 for nodeboxes, meshes, and plantlike nodes equivalent tovisual_scale
#15497visual_scale
(if we allow specifying a default transform)In fact in the far future you could implement all of
wallmounted
,facedir
,4dir
,degrotate
using this and drop them.The text was updated successfully, but these errors were encountered: