Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / how to do ragdoll physics

Author
Message
Davee
12
Years of Service
User Offline
Joined: 6th Sep 2011
Location: North West of England
Posted: 26th Oct 2013 13:45
I am guessing you use joints for ragdoll type physics.

Has anyone done this before and does anyone have code examples.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Oct 2013 11:02
You can make a ragdoll using my SpriteFX program. The code is in the example file but it's a bit complicated. Try it out and give me a shout if you get stuck.

Generally I am using revolute joints and joint limits of -0.5 to +0.5 I think...

oct(31) = dec(25)
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 27th Oct 2013 12:23
at the box2d website you can read and see something about joints in manual.
http://box2d.org/documentation/
Davee
12
Years of Service
User Offline
Joined: 6th Sep 2011
Location: North West of England
Posted: 27th Oct 2013 12:51
Thanks, I will take a look at SpriteFX and how it works for what I need.
Davee
12
Years of Service
User Offline
Joined: 6th Sep 2011
Location: North West of England
Posted: 28th Oct 2013 10:08
I'm probably missing something really obvious, but are there any tutorials on using SpriteFx
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 28th Oct 2013 11:34
I haven't made any tutorials yet, I haven't had time. Generally you need to create limb, set limb rotation, set limb parent (IE if the limb is a hand set the arm as it's parent), position the limb, set depth of each limb at the end using "send to front", "send forward" or "send back".

Once you have built a character save it and you should find the character files in your "My Documents/AGK/SpriteFX/media" folder.

You can then put this in a project media folder and include the spritefx include file from the demo in your project.

It's not simple and I will make a helpful video at some point soon but I'm very short on time at the moment, sorry! There are some contextual hints in the top right corner of the screen if you press "h" at any time.

oct(31) = dec(25)

Login to post a reply

Server time is: 2024-05-20 08:33:17
Your offset time is: 2024-05-20 08:33:17