bansheeGz / BGCurve

Bezier spline editor for Unity game engine
MIT License
145 stars 27 forks source link

breadboard logic simulator #16

Open enemali opened 5 years ago

enemali commented 5 years ago

Can this be used in a breadboard or circuit logic simulator as wires placing in 2d game?

banshee-gzzz commented 5 years ago

It is generic Bezier spline implementation, it can be used for anything related to Bezier spline Could you please give me more details or a reference to what you are trying to achieve?

enemali commented 5 years ago

thank you for trying to help, what i want is to simulate a simple circuit for kids where the user drag and drop a wire at runtime from battery to circuit board as shown below either in 2d or 3d mode. Any assistance on how to do this?

circuit

circuit2

banshee-gzzz commented 5 years ago

I think it can be done like this: 1) Use 2 points spline like shown on the picture. Point0 will be attached to a battery and point1 will be draggable. Once a player clicks/taps on point1 and drags it- change its position to follow the mouse/finger. Also, change point0's control2 position a little bit to simulate tension depending on the Point1 current position. 2) To visualize wire use this component-http://www.bansheegz.com/BGCurve/Cc/BGCcVisualizationLineRenderer/ with opaque material

Support_14_08_2019

enemali commented 5 years ago

i will give it a try , thanks for taking your time to explain it