Caronte3D Posted November 30 Posted November 30 I found some code on the forum, but it's for older versions and I don't have enough experience adapting it to the new version. Does anyone have any code they could share? Thanks in advance. Quote
Yue Posted November 30 Posted November 30 I can give you suggestions for implementing ragdoll physics. The basic idea is that the character's skeleton, joints, and bones are set to 0,0,0 rotations, and when the character dies, rigid bodies take their place and follow the position and rotation of these bones with joints. The point is that I know what I've told you may not be very helpful. My suggestion is to keep trying and learning how this works. That's the path I've had to follow, but Leadworks 5 implements it very well. You can create animations of standing up and all that in the best AAA game style. If you have any questions, let me know, and we'll figure this out togethe Translated with DeepL.com (free version) Quote Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Caronte3D Posted November 30 Author Posted November 30 I doesn't have enough experience with this engine and I was thinking someone could share the code to no reinvent the wheel, but... thanks anyway by your help. Quote
Yue Posted November 30 Posted November 30 This is simpler than you might think once you understand how it works. A mesh has a skeleton. The key is that these bones are oriented at 0, 0, 0. When the player dies, rigid bodies are created at each bone and connected to each other by joints. The bones follow these rigid bodies when the ragdoll is activated. I think you're in the same place I was when I first wanted to understand this, but it takes time to learn the concepts and do tests, and it won't be easy. But you have to start somewhere, so maybe I'll make a tutorial about all this. Translated with DeepL.com (free version) Quote Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Caronte3D Posted December 1 Author Posted December 1 The fact is, I'm finding it really hard to get used to this engine. I'm an intuitive learner, and for some reason, I'm having trouble finding what I need in the API to get the code I want. Most of the time, I end up with errors and descriptions I'm not used to, which are simply not intuitive for troubleshooting. I found it much easier with other engines (Unity, Unreal, O3DE, Upbge...). Also, the changes of LE4>UltraEngine>LE5... is a pain and you get lost very easy. I tried the IAs to get help, but have the same problem: too much changes in the API gives code not usable today. I really like what I see in this engine, its speed, the agility it offers when developing with it, etc. I hope I can get used to it quickly. A tutorial on how to make ragdolls would be wonderful; I haven't found a single one anywhere online. I know creating a tutorial is very time-consuming, and I would really appreciate it if you decide to do it. Note: I saw your AstroCuco project (very interesting) and noticed that it includes text in Spanish. Spanish is my native language 1 Quote
Caronte3D Posted 6 hours ago Author Posted 6 hours ago I'm going to be crazy with the ragdoll What is the correct way to copy the collider rotation and position to a bone? At the moment, I have a functional ragdoll, but only some bones doesn't work as expected and I don't know why Video showing the error: Thi's part of code where I transfer the position and rotation: for _, name in ipairs(updateOrder) do local data = self.rigidBodies[name] local bd = self.bones[name] if data and data.marker and bd and bd.bone then local markerWorldPos = data.marker:GetPosition(true) self.transformHelper:SetPosition(markerWorldPos, true) local skeletonPos = self.transformHelper:GetPosition(false) bd.bone:SetPosition(skeletonPos, true) local worldRot = data.marker: GetQuaternion(true) local localRot = TransformRotation(worldRot, nil, model) bd.bone: SetRotation(localRot:ToEuler(), true) end end Quote
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.