File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,8 +131,8 @@ export default class Barrel extends ObjectEntity {
131131
132132 this . physicsData . values . width = this . definition . width * sizeFactor ;
133133 this . positionData . values . angle = this . definition . angle + ( this . definition . trapezoidDirection ) ;
134- this . positionData . values . x = Math . cos ( this . definition . angle ) * ( size / 2 + ( this . definition . distance || 0 ) ) - Math . sin ( this . definition . angle ) * this . definition . offset * sizeFactor ;
135- this . positionData . values . y = Math . sin ( this . definition . angle ) * ( size / 2 + ( this . definition . distance || 0 ) ) + Math . cos ( this . definition . angle ) * this . definition . offset * sizeFactor ;
134+ this . positionData . values . x = Math . cos ( this . definition . angle ) * ( size / 2 + ( ( this . definition . distance ?? 0 ) * sizeFactor ) ) - Math . sin ( this . definition . angle ) * this . definition . offset * sizeFactor ;
135+ this . positionData . values . y = Math . sin ( this . definition . angle ) * ( size / 2 + ( ( this . definition . distance ?? 0 ) * sizeFactor ) ) + Math . cos ( this . definition . angle ) * this . definition . offset * sizeFactor ;
136136
137137 // addons are below barrel, use StyleFlags.aboveParent to go above parent
138138 if ( barrelDefinition . addon ) {
You can’t perform that action at this time.
0 commit comments