Teardown
99 个评价
Magnets
2
   
奖励
收藏
已收藏
取消收藏
Type: Global
Category: Tool
文件大小
发表于
更新日期
1.648 MB
2022 年 3 月 22 日 下午 12:27
2024 年 11 月 6 日 上午 9:59
4 项改动说明 ( 查看 )

订阅以下载
Magnets

在 Geneosis 的 1 个合集中
Geneosis' Creations
26 件物品
描述
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
引用自 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 ;)
热门讨论 查看全部(1)
2
2022 年 5 月 21 日 下午 10:39
Geneosis is amazing and always delivers.
Kalinite
71 条留言
Geneosis  [作者] 9 月 28 日 上午 11:09 
Want more magic in your life? How about changing your job to Enchanter ?
Geneosis  [作者] 2024 年 11 月 6 日 上午 10:01 
Mod updated! You now properly hold the magnet in third person ;)
see full patch notes
Geneosis  [作者] 2024 年 11 月 1 日 上午 11:48 
Swing it, thrust it, slash it, stab it, smash it, slice it, be a true Ascended Sword Master !
Geneosis  [作者] 2024 年 7 月 14 日 上午 10:58 
Build up your defences, the Synthetic Swarm is spreading!
Geneosis  [作者] 2024 年 5 月 25 日 上午 10:01 
Make your world a better place... Add some Lively Bunnies to it!
Geneosis  [作者] 2024 年 5 月 5 日 下午 3:38 
Practice your parkour skills like never before with Always Up!
Geneosis  [作者] 2024 年 4 月 29 日 上午 9:31 
- What degree do you have?
- I have a degree in Solid Sphere Summoning
- Excuse me what?
Geneosis  [作者] 2024 年 1 月 7 日 下午 2:12 
Get ready to take Control
Geneosis  [作者] 2024 年 1 月 3 日 上午 4:36 
Mod updated! This mod should no longer be broken after using a quickload ^^
see full patch notes
poopoo 2023 年 10 月 15 日 上午 11:15 
yes bitch! magnets!!