Yue Posted December 24, 2021 Share Posted December 24, 2021 The question is clear, I have two pieces joined by a joint, but I need them not to collide, what happens is that when the ragdoll is launched, the character has death cramps, of epilepsy. 1 Quote Link to comment Share on other sites More sharing options...
Slastraf Posted December 24, 2021 Share Posted December 24, 2021 Have you set your object collision type to debris ? It collides with scene and props, but not with itself. Here you can find a quick example but you should try out Collision.Debris or find the index for it https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetCollisionType 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted January 2, 2022 Share Posted January 2, 2022 Two entities that are connected with a joint will not collide with each other. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted January 5, 2022 Author Share Posted January 5, 2022 On 1/2/2022 at 6:12 AM, Josh said: Two entities that are connected with a joint will not collide with each other. Your comment is spot on. What happens is that by moving the rigid bodies to the joints of the character, there is a clash between several pieces while creating the joints. In this case, setting the collision to debris type solves the problem. Another issue is that I have problems with the rotations of the bone reticulations and the rotation of the rigid body, for some reason it doesn't match. Translated with www.DeepL.com/Translator (free version) Quote Link to comment Share on other sites More sharing options...
Josh Posted January 6, 2022 Share Posted January 6, 2022 If you are creating a hinge joint, the starting orientation is an angle of zero. There is no correlation between the entity rotations and the joint angle. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted January 7, 2022 Author Share Posted January 7, 2022 Now I'm having this problem, my feet are stretching strangely. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 8, 2022 Share Posted January 8, 2022 Are you using SetMatrix()? You should probably just use SetPosition and SetRotation (using a quaternion) to avoid any problems with scaling. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted January 8, 2022 Author Share Posted January 8, 2022 6 hours ago, Josh said: Are you using SetMatrix()? You should probably just use SetPosition and SetRotation (using a quaternion) to avoid any problems with scaling. What I am doing is taking the bone of the foot and telling it to be son of the rigid body for the ragdoll effect of the foot. Then I have found solution to the problem, and that is that it is the respective rotation of the bone I have to set it to 0,0,0 locally. --Test Ragdoll. if Input:GetKeyHit(Key.R) and self.ragdoll == false then self.ragdoll = true if self.ragdoll == true and self.player:GetPhysicsMode() ~= Entity.RigidBodyPhysics then if self.player:GetPhysicsMode() == Entity.CharacterPhysics then self.player.meshPlayer:SetMass(0) self.player:SetPhysicsMode(Entity.RigidBodyPhysics) self.RPlayer:InitShapes() self.RPlayer:InitJoints() self.RPlayer:SetRotations(true) self.RPlayer:SetPositions() self.RPlayer:SetParents() self.RPlayer:SetMass(10) end end end The above script is the prototype to activate the ragdoll effect, I am using the SetRotation and SetPosition. Quote Link to comment Share on other sites More sharing options...
Yue Posted January 8, 2022 Author Share Posted January 8, 2022 Quote Link to comment Share on other sites More sharing options...
Yue Posted January 8, 2022 Author Share Posted January 8, 2022 Fix here. 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted January 8, 2022 Share Posted January 8, 2022 I would probably manually set the rotation and position of each bone, rather than changing the parent. But whatever works. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted January 8, 2022 Author Share Posted January 8, 2022 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.