Teardown

Teardown

98 ratings
Magnets
2
   
Award
Favorite
Favorited
Unfavorite
Type: Global
Category: Tool
File Size
Posted
Updated
1.648 MB
Mar 22, 2022 @ 12:27pm
Nov 6, 2024 @ 9:59am
4 Change Notes ( view )

Subscribe to download
Magnets

In 1 collection by Geneosis
Geneosis' Creations
25 items
Description
Placeable magnets.

Now in v1.0.3! (see full patch notes)

  1. Place South magnet.
  2. Place North magnet.
  3. ????
  4. PROFIT!!!

Demo video by Tearspot.

TOOLS
- Magnet: You can place magnets.

KEYBOARD CONTROLS
- [LeftClick]: Stick Magnet.
- [MiddleClick]: Drop Magnet.
- [RightClick]+[Scroll]: Change held Magnet polarity.
- [K]: Remove all Magnets.
- [O]: Open options menu.
While aiming at a Magnet
- [E]: Change selected Magnet polarity.
- [R]: Remove selected Magnet.
- [T]: Attach/Detach selected Magnet.

CHARACTERISTICS
- Magnets of same polarity repel each other.
- Magnets of opposite polarity attract each other.
- Magnets with North polarity have a red outline.
- Magnets with South polarity have a blue outline.
- Magnets are made of unbreakable metal.
- All magnets interact with each other all the time (spawning too many magnets will cause lag).

KNOWN BUGS
- Detached Magnets fail to stick together when magnetic force is too strong.
- When a too high magnetic force is applied to a magnet it may freak out a little.
- Magnets may glitch through matter if too much magnetic force is applied to them.
- Magnets attached to other objects may rotate to weird angles.

DEV NOTES
Originally posted by About this mod:
The destruction caused by the magnet part in Instruments of Destruction made me check if magnets were a thing in the Teardown workshop already... Surprisingly, they were not! So that sounded like a good way to make use of the new Spawn() function in a mod for me :)
Nothing too fancy about the spawning itself, I made magnets as little metal cubes similar to those you can find in some offices to stick papers on whiteboards.
I took some time to look for a decent way to compute magnetic force, and it turns out this could become really complex really fast! So I created each magnet as a single point (the center of the cube) with a single polarity and used some mathematical function that I found (that was understandable enough for me) to compute what magnetic force should be applied on them :p
At this point magnets were just loose cubes bouncing around on the map but not really sticking to anything aside each other. I considered making any object containing metal become magnetic too, but the formula I used to compute magnetism would have instantly melted my computer if I did that XD So I tried a different approach by allowing you to stick magnets to any existing object in the map.
The sticky part uses the same method planks uses to become attached to existing objects, except it attaches in a single point. I could not get it to work perfectly (the magnet rotation is not perfectly locked so it may end up rotating when sticked to something) but it works well enough for its intended purpose: being able to lift/levitate/eject any object you want by sticking some magnets to it :p
I also tested if I could let the player detach and attach a magnet manually at any time (not only at spawn), and it worked exactly as expected, so that's a nice bonus feature ;)
Popular Discussions View All (1)
2
May 21, 2022 @ 10:39pm
Geneosis is amazing and always delivers.
Kalinite
70 Comments
Geneosis  [author] Nov 6, 2024 @ 10:01am 
Mod updated! You now properly hold the magnet in third person ;)
see full patch notes
Geneosis  [author] Nov 1, 2024 @ 11:48am 
Swing it, thrust it, slash it, stab it, smash it, slice it, be a true Ascended Sword Master !
Geneosis  [author] Jul 14, 2024 @ 10:58am 
Build up your defences, the Synthetic Swarm is spreading!
Geneosis  [author] May 25, 2024 @ 10:01am 
Make your world a better place... Add some Lively Bunnies to it!
Geneosis  [author] May 5, 2024 @ 3:38pm 
Practice your parkour skills like never before with Always Up!
Geneosis  [author] Apr 29, 2024 @ 9:31am 
- What degree do you have?
- I have a degree in Solid Sphere Summoning
- Excuse me what?
Geneosis  [author] Jan 7, 2024 @ 2:12pm 
Get ready to take Control
Geneosis  [author] Jan 3, 2024 @ 4:36am 
Mod updated! This mod should no longer be broken after using a quickload ^^
see full patch notes
poopoo Oct 15, 2023 @ 11:15am 
yes bitch! magnets!!
Mellow Oct 1, 2023 @ 2:07am 
but it is a different mod