Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 735 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: [Advice] Ragdoll, Collisions & Physics [Re: indiGLOW] #295518
10/25/09 19:47
10/25/09 19:47
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
im sorry, I am gonna send the files out somewhere next week to anyone that PM'd me...
Hadda revamp the header files (I believe evilSOB made them for me someday... gotta find that out for credit purposes too) to make it all properly work as a simple plugin.

kind regards and thanks for the waiting.


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: [Advice] Ragdoll, Collisions & Physics [Re: Helghast] #295669
10/26/09 19:53
10/26/09 19:53
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Simple steps:

1) When your player dies, create a basic skeleton of simple blocks for the bones. I don't remember the names (been a while), but their are functions for reading the position and angles of the current animation. Start with the chest block, being at the players xyz position and having the same angles as well; This will be your base for the ragdoll pieces. Create the arms and legs afterwards. Once finished, you should have a simple skeleton for your model. Make sure your character stores a pointer to each model you create, so you can look them up later.

2) Create hinges (not ball joints) between your bones. You can only read angles from hinges, not ball joints. Activate physics for all the bones. At this point, when your character dies, it should have a skeleton created that matches it's animated position, which now has proper ragdoll physics.

3) Now that your skeleton is moving, use those pointers to reference back to the skeleton. Set your models position and orientation to the base (chest) models position. There is a physics function for checking the angle of physics constraints, use this and some tricky angle rotations to rotate your models bones to match the skeleton. Make sure you reset the models animation before doing the rotations.

The skeleton models you use for physics will have to be "tuned" to match each area of the model. Also make sure you set their invisible flags of course.

Helghast and I worked on this code together, so our code is very similar. Read through it, and match it up to whats described above, and you should be able to get it working and fit to your needs.


xXxGuitar511
- Programmer
Re: [Advice] Ragdoll, Collisions & Physics [Re: xXxGuitar511] #302100
12/16/09 16:09
12/16/09 16:09
Joined: Jul 2009
Posts: 150
B
Blackchuck Offline
Member
Blackchuck  Offline
Member
B

Joined: Jul 2009
Posts: 150


I have know Gamestudio/A7 Commercial Edition 7.84
Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1