Godot-v3-Tutorials-Competent icon indicating copy to clipboard operation
Godot-v3-Tutorials-Competent copied to clipboard

Adapting RigidBody Chain Swing

Open adamprocter opened this issue 6 years ago • 9 comments

I am trying to adapt your project into a tug of war style approach. Ill attach my hacking away so far, just press up and down, not sure how I might add in extra variables I can add to set min and max values for all the pins ? Maybe this is not the way, I did try with SpringDamp but I couldn't create the nice chain you have with the pins... maybe I need both ?

Spring A > Pin Joints > Spring B

Hope you don't mind me posting here, Ive requested to join Steemit

Tugggr.zip

adamprocter avatar Apr 23 '18 18:04 adamprocter

Cool. Love seeing feedback and others being inspired. I'll take a gander at it later and give you feedback. Definitely get it loaded into this repository when you are happy with it.

sp33dy avatar Apr 23 '18 19:04 sp33dy

Good morning. I tried to open the project from the Zip, but it kept failing. Thus, I imported each component until it worked.

I'm intrigued as to what you are aiming at here. It certainly looks interesting! I.E. would this be a game idea and if so, how would you really get it working? I guess multiple players? but pressing a key really doesn't inject the 'power variance'.

I "think" the issue you have, with two ends pulling, is that the links would not stretch in real-life. Given this, you'd have to ensure they never exceed their Pin Joint lengths. Further to this, once all are stretched, the force would then tug on the player at the end (hence, a true tug-of-war effect).

Using a Spring would not be appropriate, given a spring allows for stretching. Instead, I think you need joints that perform restrictions in both directions. What I mean here is that if you pick up a chain, it goes from loose to taut. The slack is removed between links (there's not a lot of movement when they are side by side). If two players pull on either end, you need the joints to work in both ways and the final, overpowering force, to be applied to the weaker of the two. I "think" (without trying, that having a dual way connection would then ensure bi-directions are applied and for the winner to take effect.

I don't currently have time to experiment with this, but if I do, I'll see if I can get it working.

Keep going and let me know your findings!

sp33dy avatar Apr 24 '18 08:04 sp33dy

odd here is a dropbox link just in case https://www.dropbox.com/s/vzs5j22b9q67zkp/Tether.zip?dl=0

and here is a little video I like the effect, if it was able to stop https://www.dropbox.com/s/9d9wfu85oeqtu8j/chain2.mov?dl=0

I actually wanted a bit more of an elastic feel, the 2 players are tethered together which is why I played with the spring before, this started to have the desired effect but I needed to draw the rope between and I liked the way the chain with pin was working, but what I want is an overall min-max stretch I guess, which I why I considered combining the chain concept you had with a dampened spring.

If I get it into any usable state Ill send you a future zip too.

adamprocter avatar Apr 24 '18 09:04 adamprocter

in terms of a game idea this will be a working game, in the next 8 weeks, I am just trying to help a student get a better finessed key mechanic. http://winchester.games/elateth.html

adamprocter avatar Apr 24 '18 09:04 adamprocter

Oh, you are down the road from me! I'm in Stubbington.

On Tue, Apr 24, 2018 at 10:17 AM, Adam Procter [email protected] wrote:

in terms of a game idea this will be a working game, in the next 8 weeks, I am just trying to help a student get a better finessed key mechanic. http://winchester.games/elateth.html

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sp33dy/Godot-v3-Tutorials-Competent/issues/3#issuecomment-383862904, or mute the thread https://github.com/notifications/unsubscribe-auth/AL0fmDT6GIaqTRQ3tz-CKiE73JDsDDXGks5tru20gaJpZM4TgXOC .

sp33dy avatar Apr 24 '18 09:04 sp33dy

Did you look at the rope example? https://steemit.com/utopian-io/@sp33dy/tutorial-godot-engine-v3-gdscript-rigidbody-rope

This had to deal with the stretching a little more than the chain; given there were no 'rotation pins'

On Tue, Apr 24, 2018 at 10:24 AM, Carl Ellam-Speed [email protected] wrote:

Oh, you are down the road from me! I'm in Stubbington.

On Tue, Apr 24, 2018 at 10:17 AM, Adam Procter [email protected] wrote:

in terms of a game idea this will be a working game, in the next 8 weeks, I am just trying to help a student get a better finessed key mechanic. http://winchester.games/elateth.html

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sp33dy/Godot-v3-Tutorials-Competent/issues/3#issuecomment-383862904, or mute the thread https://github.com/notifications/unsubscribe-auth/AL0fmDT6GIaqTRQ3tz-CKiE73JDsDDXGks5tru20gaJpZM4TgXOC .

sp33dy avatar Apr 24 '18 09:04 sp33dy

No I didn’t. Will take a look thanks

adamprocter avatar Apr 24 '18 11:04 adamprocter

I had a plan to attached a rope to the bottom of each player and then pin them together in the middle... but my pieces just fall off the player :D

screenshot 2018-04-24 14 17 10

adamprocter avatar Apr 24 '18 13:04 adamprocter

Cool your more than welcome to come to our Show in Winchester ! see whether the Tether got anywhere useful :D

On 24 Apr 2018, at 10:24, Sp33dy [email protected] wrote:

Oh, you are down the road from me! I'm in Stubbington.

On Tue, Apr 24, 2018 at 10:17 AM, Adam Procter [email protected] wrote:

in terms of a game idea this will be a working game, in the next 8 weeks, I am just trying to help a student get a better finessed key mechanic. http://winchester.games/elateth.html

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sp33dy/Godot-v3-Tutorials-Competent/issues/3#issuecomment-383862904, or mute the thread https://github.com/notifications/unsubscribe-auth/AL0fmDT6GIaqTRQ3tz-CKiE73JDsDDXGks5tru20gaJpZM4TgXOC .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sp33dy/Godot-v3-Tutorials-Competent/issues/3#issuecomment-383864982, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHkL5B_38lmiNUd6DqW8aS_M5wqL8aWks5tru8_gaJpZM4TgXOC.

adamprocter avatar Apr 24 '18 14:04 adamprocter