fumanshoo Posted December 7, 2012 Share Posted December 7, 2012 So I am just wondering where to start with ragdolls. I want to just understand how they work and the best way to implement them in Leadwerks. Is there a way to even do it with Lua? I've never made ragdolls before except in Blender where you make simple joints between objects, but i would like to know how you do it with a single mesh. Just want to know the basics and if anyone has a link to some good info on it, that would be much appreciated Quote Link to comment Share on other sites More sharing options...
Road Kill Kenny Posted December 8, 2012 Share Posted December 8, 2012 position pre-made physics bodies in the same position and orientation as the animation bones. Then connect them with joints and set their constraints the. Apply physics to those bodies and whalla you have Ragdoll. That's the basic concept but it is very much a fiddly piece of work and a bit of a glossy thing that isn't necessary until you have gameplay. 2 Quote STS - Scarlet Thread Studios AKA: Engineer Ken Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now! Link to comment Share on other sites More sharing options...
fumanshoo Posted December 8, 2012 Author Share Posted December 8, 2012 Sounds simple enough, but what about activating and de-activating physics when the character collides with another object. Like for example, character 1 strikes character 2 to the ground and character 2 has ragdoll physics. How does one make him not get back up from that fall but in that case, de activating the ragdoll physics again. ( basically switching the physics on and off depending on the situation ) might there be some sort of physics switch function??? Quote Link to comment Share on other sites More sharing options...
Road Kill Kenny Posted December 8, 2012 Share Posted December 8, 2012 If the bodies are parented to the bones then the bones have control. Therefore, the character can be animated. If the bones are parented to the bodies then the bodies have control and it will be ragdoll. I would also play around with disabling gravity mode on the bodies when not in ragdoll and also changing their entity type so they don't collide with anything. However, because they are parented they should collide anyway. 1 Quote STS - Scarlet Thread Studios AKA: Engineer Ken Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now! Link to comment Share on other sites More sharing options...
Josh Posted December 8, 2012 Share Posted December 8, 2012 I would manually update the bone positions and orientations because it will mess up the skinning if you start reparenting bones. Just create a physics skeleton using the same hierarchy as the model's bones. 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...
Road Kill Kenny Posted December 8, 2012 Share Posted December 8, 2012 I would manually update the bone positions and orientations because it will mess up the skinning if you start reparenting bones. Just create a physics skeleton using the same hierarchy as the model's bones. good point Quote STS - Scarlet Thread Studios AKA: Engineer Ken Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now! Link to comment Share on other sites More sharing options...
fumanshoo Posted December 8, 2012 Author Share Posted December 8, 2012 Well like you said, all this isn't necessary until I have gameplay, so until then, thanks for the tips. I now have a much better understanding of ragdolls haha Quote Link to comment Share on other sites More sharing options...
Road Kill Kenny Posted December 8, 2012 Share Posted December 8, 2012 If / when you manage to get familiar with all LE's features as well as some important coding techniques you begin to be able to figure out a way to do just about anything. Whether it is the best way to do it or not is another story. However, I find there aren't too many rules in game development, if you come up with an idea of how something might work... try it.. you never know it might just work. If it fails not all is lost you will have learned something from the experience and will be better for it. 2 Quote STS - Scarlet Thread Studios AKA: Engineer Ken Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now! Link to comment Share on other sites More sharing options...
fumanshoo Posted December 8, 2012 Author Share Posted December 8, 2012 words of a wise man and I will keep them in mind on my wonderful journey of game development 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.