Added parameter inputs from the slider and checkboxes
Added parameter inputs from the slider and checkboxes
@tristanbob It can be tested here: https://editor.gdevelop.io/?project=https://raw.githubusercontent.com/planktonfun/GDevelop-examples/joint-connector/examples/joint-connector/joint-connector.json
Thanks Bouh! I was able to start looking at this but sadly I will not have a lot of time available this week.
I am excited by the potential of this extension, it will make ragdolls accessible to everyone!
On Sun, Oct 23, 2022 at 9:47 AM Aurélien Vivet @.***> wrote:
@tristanbob https://github.com/tristanbob It can be tested here:
https://editor.gdevelop.io/?project=https://raw.githubusercontent.com/GDevelopApp/GDevelop-examples/8a9b1672eefaaacd7ccb8071a877bd8698c15b76/examples/joint-connector/game.json
— Reply to this email directly, view it on GitHub https://github.com/GDevelopApp/GDevelop-examples/pull/396#issuecomment-1288141391, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDX5Q3UDTZXHNHUWBAPYLDWEVMYDANCNFSM6AAAAAARHVXBEU . You are receiving this because you were mentioned.Message ID: @.***>
-- Tristan Rhodes
@planktonfun wow, this was even closer to fully functional than I first thought! Here is the playable game. Everything except breakable joints is working!
https://liluo.io/victrisgames/extension-joint-connector
Next steps:
-
In the javascript function, can you create object links between each physics object and the joint connector that was used to position the joint? I think this is necessary for the breakable joint action to work. Let me know if you have other ideas as well.
-
I also want to offer a "Weld" joint that can be used to connect two objects. Do you think this should be done as a parameter to the existing javascript function?
Joint type: Revolute, Weld
I added Weld Joints... I'm really excited about this extension!!! https://twitter.com/VictrisGames/status/1604125638440284160
I think I will keep working on this:
- Create a Weld Joint behavior so the variables can be adjusted during the game
- Implement Distance joints (useful for wheels)
So much progress today!
- Weld joints
- Distance joints
- Breakable joints
https://twitter.com/VictrisGames/status/1604273466743537665
@D8H I'm done for today. If you want to use the "generate functions button" you are working on, we still need to create get/set functions for the "Weld" and "Distance" joint behaviors. If you are busy, then I can work on this tomorrow (about 16 hours from now).
Added fix to enable/disable breakable joints per individual group
https://user-images.githubusercontent.com/1837825/208309059-ccadeda7-6684-42dc-ad46-ba85b15c5673.mp4
Added fix to enable/disable breakable joints per individual group
I'm not certain what this does. Was this a fix or a new feature? Can you explain it some more?
Thanks!
I'm not certain what this does. Was this a fix or a new feature? Can you explain it some more?
Thanks!
Test the last build, it cannot make two instances breakable and unbreakable at the same time. The new and old joints are modified globally.
more specifically:
everytime a layout is created the "CreateRevoluteJoints" function also includes the old joints that's already been modified.

I fixed the reference angle so it is now dynamic, based on the starting angles of the objects.
@planktonfun I'm not sure your last commit is doing what you think it is. I'm debating on keeping it, removing it, or trying to fix it.
How do you explain this, Its like grouping each ragdoll individually, if one ragdoll reach high velocity that ragdoll will break, the other ragdoll is unaffected. you can remove it if everything works as expected
@D8H this is ready for review, but some of the checks seem to have internal errors (perhaps from using the new version of GDevelop, v5.1.157). Can you see what is causing these errors?
What is the difference between the variable "JointID" and "JointId"?
The BreakJointIfNeeded is a bit strange. Users will expect BreakingEnabled it to work without having to call an action or if they call an action to break the joint why would they need to set the property.
findIndex can make the code that searches for 2 objects easier to follow:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex
What is the difference between the variable "JointID" and "JointId"?
@planktonfun can you answer this?
The
BreakJointIfNeededis a bit strange. Users will expectBreakingEnabledit to work without having to call an action or if they call an action to break the joint why would they need to set the property.
I agree, but there is no way to perform an action on multiple objects inside a lifecycle event (let me know if I am wrong about this).
One minor improvement might be to remove the "BreakingEnabled" property and then users can simply use the "Break joint if exceeds limits" action instead. What do you think about this idea?
findIndexcan make the code that searches for 2 objects easier to follow: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex
I understand what this function does, but not how it could be used to simplify this extension. Can you provide more info?
I removed the "Enable/Disable" breaking of joints.
I also commented out the lines of code that had the "JointId*" variables. I wasn't able to figure out what they did, and after disabling those lines, the game example still functions the same. I can delete these lines if we agree they are not needed.
Closing, replaced by https://github.com/GDevelopApp/GDevelop-examples/pull/514.