Skip to content

[features] roll and offset support#1643

Draft
Deepseasaltyfish wants to merge 24 commits intoTeamOpenIndustry:masterfrom
Deepseasaltyfish:roll_feature_based_on_master
Draft

[features] roll and offset support#1643
Deepseasaltyfish wants to merge 24 commits intoTeamOpenIndustry:masterfrom
Deepseasaltyfish:roll_feature_based_on_master

Conversation

@Deepseasaltyfish
Copy link

@Deepseasaltyfish Deepseasaltyfish commented Mar 4, 2026

Main Feature: Add support for Roll and Offset
This PR depends on:
TeamOpenIndustry/TrackAPI#15 (merged)
TeamOpenIndustry/ImmersiveRailroadingIntegration#20
TeamOpenIndustry/UniversalModCore#226

Deepseasaltyfish and others added 22 commits February 22, 2026 16:04
…ompat, fix crash when spawning train on MinecraftRail in some case
…cept GUI curve drawing and length calculating has been finished
…g, fix interpolate function to fix curve generating, fix curve setting function, correct yaw with z-offset, change storage definition to scaled
…lic, add arrow to curve and shorten button text, fix sway, fix some translation
…lculating problem, update Gui drawing, add new linearize to replace old one
…om to store RailSettings with a key, add client-side update in Gui oncClose(), store guiOpenType in item and update gui open method
@@ -0,0 +1,26 @@
package cam72cam.immersiverailroading.gui.util;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we let this be in UMC?

Vec3d particlePos = stock.getPosition().add(VecUtil.rotateWrongYaw(exhaust.center.scale(stock.gauge.scale()), stock.getRotationYaw() + 180));

// Vec3d particlePos = stock.getPosition().add(VecUtil.rotateWrongYaw(exhaust.center.scale(stock.gauge.scale()), stock.getRotationYaw() + 180));
Vec3d particlePos = stock.getModelMatrix().rotate(Math.toRadians(stock.getRotationRoll()),1, 0, 0).apply(exhaust.center);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we rotate roll in stock.getModelMatrix() directly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants