Skip to content

Commit

Permalink
Fix ljoint bo (#6355)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Délèze authored Aug 15, 2023
1 parent fe40a58 commit 9850555
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions projects/objects/factory/pipes/protos/LJoint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# documentation url: https://webots.cloud/run?url=https://github.com/cyberbotics/webots/blob/released/projects/objects/factory/pipes/protos/LJoint.proto
# keywords: industrial/plumbing
# 90-degree L-joint for connecting pipes.
# template language: javascript

EXTERNPROTO "webots://projects/appearances/protos/OldSteel.proto"

Expand All @@ -15,6 +16,11 @@ PROTO LJoint [
field SFNode appearance OldSteel { textureTransform TextureTransform { rotation 0.78 scale 2 2 } } # Defines the appearance of the pipe.
]
{
%<
const scaleX = fields.scale.value.x;
const scaleY = fields.scale.value.y;
const scaleZ = fields.scale.value.z;
>%
Solid {
translation IS translation
rotation IS rotation
Expand Down Expand Up @@ -325,33 +331,33 @@ PROTO LJoint [
boundingObject Group {
children [
Pose {
translation 0.031098346 0 -0.036
translation %<= scaleX * 0.031098346 >% 0 %<= scaleZ * -0.036 >%
rotation 0 1 0 1.8325997
children [
Capsule {
height 0.04
radius 0.035
height %<= scaleX * 0.04 >%
radius %<= scaleX * 0.035 >%
}
]
}
Pose {
translation -0.036079734 0 0.029794677
translation %<= scaleX * -0.036079734 >% 0 %<= scaleZ * 0.029794677 >%
rotation 0 -1 0 0.2
children [
Capsule {
height 0.04
radius 0.035
height %<= scaleX * 0.04 >%
radius %<= scaleX * 0.035 >%
}
]
translationStep 0.001
}
Pose {
translation -0.019555909 0 -0.0041774259
translation %<= scaleX * -0.019555909 >% 0 %<= scaleZ * -0.0041774259 >%
rotation 0 1 0 -0.59269969
children [
Capsule {
height 0.04
radius 0.035
height %<= scaleX * 0.04 >%
radius %<= scaleX * 0.035 >%
}
]
rotationStep 0.01
Expand Down

0 comments on commit 9850555

Please sign in to comment.