Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by strich · Oct 31, 2012 at 10:21 AM · c#physicseventsmessaging

Wiring Script & Relaying Messages

I'm playing around with some prototype game ideas and one I have involves simulating the wiring of equipment around a ship. The most similar practical example of this is the Wire Mod in GarrysMod, which allows one to hook up 'power' to various objects in the game.

I've drawn a small picture of what I mean in order to get the idea across: test

The idea I have right now is to create a GameObject "WireNode". The Gameobject will be fairly typical - A model representing a wiring junction. The non-typical thing I want to develop is a script that controls the junction points A, B and C.

What I have in mind I think is quite simple: Each junction point is simply a message relay. By default everything is unconnected but if you get a device to the junction point any messages from the device are simply relayed onward until it hits another device and its actioned there. If there is a dead-end nothing happens (Or maybe a 'spark'). The idea here is that I can send 'power' or any other message between parts of the ship and simulate disconnections and whatnot.

I want the player to physically take a softbody wire (Or some sort of articulated rigidbody) and perform the connections.

What I'm looking for here is some feedback on the implementation of the idea, and any resources you think might help me. I'm a few months into Unity dev so I know a fair bit but definitely not everything:

  • I've yet to fully explore the messaging and event systems available in Unity so some information on that would be great. EDIT: On further consideration I think I'm going to use C# Events to pass between the junction points.

  • I'd like the implementation of the wires themselves to behave a lot like the softbody wire-plugs in Half-Life 2. So any resources towards snapping objects to things (Physics attractors?) and rope physics would be great.

  • I'm a bit vague on how to program the connection between the wire object and two relays - Not sure how I would do that?

Any other general feedback welcome.

Thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

Multiple Cars not working 1 Answer

Unity 5 workaround for concave colliders 3 Answers

How to use Physics.IgnoreCollision for multiple objects / toggling collisions for multiple, specific objects? 0 Answers

Hingejoint not responding on script 4 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges