Support wrapping for circular interpolated value (e.g. yaw/pitch)

This commit is contained in:
johni0702
2016-08-13 17:16:26 +02:00
parent aab7c0e5e2
commit 4459bba316
2 changed files with 4 additions and 4 deletions

View File

@@ -73,9 +73,9 @@ public class CameraProperties extends AbstractPropertyGroup {
public static class Rotation extends AbstractProperty<Triple<Float, Float, Float>> { public static class Rotation extends AbstractProperty<Triple<Float, Float, Float>> {
public final PropertyPart<Triple<Float, Float, Float>> public final PropertyPart<Triple<Float, Float, Float>>
YAW = new PropertyParts.ForFloatTriple(this, true, PropertyParts.TripleElement.LEFT), YAW = new PropertyParts.ForFloatTriple(this, true, 360, PropertyParts.TripleElement.LEFT),
PITCH = new PropertyParts.ForFloatTriple(this, true, PropertyParts.TripleElement.MIDDLE), PITCH = new PropertyParts.ForFloatTriple(this, true, 360, PropertyParts.TripleElement.MIDDLE),
ROLL = new PropertyParts.ForFloatTriple(this, true, PropertyParts.TripleElement.RIGHT); ROLL = new PropertyParts.ForFloatTriple(this, true, 360, PropertyParts.TripleElement.RIGHT);
private Rotation() { private Rotation() {
super("rotation", "replaymod.gui.rotation", GROUP, Triple.of(0f, 0f, 0f)); super("rotation", "replaymod.gui.rotation", GROUP, Triple.of(0f, 0f, 0f));