Teardown

Teardown

61 ratings
Tool transformer
2
   
Award
Favorite
Favorited
Unfavorite
Type: Global
Category: Tool
File Size
Posted
Updated
239.522 KB
26 Jan, 2022 @ 1:52pm
2 Jul, 2022 @ 2:08am
8 Change Notes ( view )

Subscribe to download
Tool transformer

Description
A mod for modders. Helps you find the transform to set for your tool and a point on your tool you desire (eg end of the gun where the bullets should shoot from)

Press M in game to enable. The unit is toolvoxel (1 toolvoxel = 0.05 meters). You would set the transform in the tick() function as shown below.

Works well on normal modded tools. Does not work on special tools like the Physgun (it does not have a tool transform as far as I can see) and annoying to use with default tools (There's some extra code that adjust their transform over this)

If you run out of range with sliders press the recenter button. Can also increase the range in the settings (editing variables in main.lua)

The mod only shows the values for the transform but does not permanently save them anywhere. (you need to note the figures down)

Note: if you are already setting the transform of your tool in another script switch that off before using this. One will overwrite the other.

Use the config file to update the settings (eg units used / slider size)
You can use it to set the starting value to be a hard coded default transform.
You can use it to edit the shapelocal transform of an individual shape of the tool, rather than the whole tool tranfrom.

ToolTransform = Transform() ToolTransform.pos = Vec(Val[ToolRight],Val[ToolUp], Val[ToolBack]) ToolTransform.rot = QuatEuler(Val[PitchUp],Val[TurnLeft], Val[RollLeft]) SetToolTransform(ToolTransform,1.2) --show points compared to tool local LocalTr = Transform(Vec(Val[PosRight],Val[PosUp],Val[PosBack])) local PointOnTool = TransformToParentPoint(GetBodyTransform(GetToolBody()),LocalTr.pos) local ToolOrigin = TransformToParentPoint(GetBodyTransform(GetToolBody()),Vec(0,0,0)) --PointOnTool = TransformToParentTransform(GetCameraTransform(),PointOnTool) DebugCross(ToolOrigin,1,1,1,0.5) DebugCross(PointOnTool,1,0,0)

I may add extra features later
-letting you adjust the config values with a UI instead of using the config file
-2 different points to adjust on the tool
-a lot more intuitive control option (eg dragging a dot in 2D on screen to adjust position)
33 Comments
CLWD 20 Nov, 2023 @ 8:44pm 
how to use?
GAT$BY 20 Oct, 2023 @ 7:59am 
впар
The Friendly Scout 26 Feb, 2023 @ 1:15pm 
welp i have voxel
Laz  [author] 25 Feb, 2023 @ 12:05pm 
Yes. TD tools use voxels that are scaled 1/2 as big as normal voxels.
The Friendly Scout 25 Feb, 2023 @ 10:14am 
Is this how tools in teardown are made they use voxel?
_RunBlood_ 29 Dec, 2022 @ 9:35am 
awwwwwww man!!!
Zap 17 Sep, 2022 @ 1:18pm 
every time I press M it randomises the location and rotation of the tool, what the hell
:steamsad:
tortuga39 10 Sep, 2022 @ 1:20pm 
IT DELETE SHAP AND COLOR AND EVERYTHING YOU USE ON dont get pls
tortuga39 10 Sep, 2022 @ 1:19pm 
IT BROKE THE TEXURE FOR MODED PISTOL
The Lone Soul 31 Aug, 2022 @ 9:06pm 
what