Skip to content

Hrober0/Cable-physics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cable physics

Real-time simulation of cable behaviors, such as:

  • move - connectors that can be lifted and moved
  • connect to the connector - keeps divided into colors and male and female connectors
  • stretching - the cable can extend to the designated length, after exceeding it, the cable disconnects from the connector, returning to the neutral length
  • overlapping cables - they have collisions with each other and can be lifted and moved

Cable behavior demonstration video: youtube.com/Hrober/cables-physics

The whole system was used in-game named Errata.
Errata trailer: youtube.com/Errata/errata-trailer

Project structure

Cables scripts

Main cable script:
github.com/Hrober0/Cable-physics/Assets/PhysicCalbes/Scripts/PhysicCable.cs

Cable connector script:
github.com/Hrober0/Cable-physics/Assets/PhysicCalbes/Scripts/Scripts/Connector.cs

Interactions scripts

Scripts required to interact with cables:
github.com/Hrober0/Assets/Interactions
(Whose dependencies can be easily removed)

Sample player controller

Sample first-person player controller used to show sample of interaction with cables:
github.com/Hrober0/Assets/SamplePlayerController

Sample scene

Sample scene used to show sample of interaction with cables:
github.com/Hrober0/Assets/Scenes
Scene contains plyer, basic environment and some cables and connectors.

Used Technologies

Unity

C#

Used Packages

NaughtyAttributes

NaughtyAttributes is an extension for the Unity Inspector.
It expands the range of attributes that Unity provides so that you can create powerful inspectors without the need of custom editors or property drawers. It also provides attributes that can be applied to non-serialized fields or functions.
Link: https://github.com/dbrizov/NaughtyAttributes

About

Cable physics made with unity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages