Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, AndrewAMD), 911 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 1 of 3 1 2 3
ragdoll #147904
08/14/07 15:41
08/14/07 15:41
Joined: Mar 2004
Posts: 281
England
frescosteve Offline OP
Member
frescosteve  Offline OP
Member

Joined: Mar 2004
Posts: 281
England
Is there a way to make a ragdoll like character. If so, would you need separate entities and then attach them. or use another method? And if you use constraints how do you make it so the model is able to move? ~(anchor point stop movement)

Last edited by frescosteve; 08/14/07 15:45.
Re: ragdoll [Re: frescosteve] #147905
08/14/07 18:01
08/14/07 18:01
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
This has been asked many times, please use the search button

..yes, you can make ragdoll physics in 3DGS

http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/766714/an/0/page/0#Post766714


xXxGuitar511
- Programmer
Re: ragdoll [Re: xXxGuitar511] #147906
08/14/07 21:15
08/14/07 21:15
Joined: Mar 2004
Posts: 281
England
frescosteve Offline OP
Member
frescosteve  Offline OP
Member

Joined: Mar 2004
Posts: 281
England
I have used the search feature but most of the posts are out dated or lack information so i created a specific thread on ragdoll. Plus, when i said is there a way i was asking for an example for the code. sorry if this wasn't seen in that way.

Last edited by frescosteve; 08/14/07 21:17.
Re: ragdoll [Re: frescosteve] #147907
08/15/07 04:54
08/15/07 04:54
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
well, what part of code interests you?

Re: ragdoll [Re: Shadow969] #147908
08/16/07 01:53
08/16/07 01:53
Joined: Mar 2004
Posts: 281
England
frescosteve Offline OP
Member
frescosteve  Offline OP
Member

Joined: Mar 2004
Posts: 281
England
The section to attach physics objects to a bone ready model which moves segments accordingly. any code will surely help.

Last edited by frescosteve; 08/16/07 09:17.
Re: ragdoll [Re: frescosteve] #147909
08/16/07 12:28
08/16/07 12:28
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
If someone can tell me how to place a bone on a modelsposition I´m done with my (hopefully easy to use) ragdollsystem...
It would be great if someone could help me
Thanks,
Slin

Re: ragdoll [Re: Slin] #147910
08/16/07 14:48
08/16/07 14:48
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
well, last time i've done it i had no probems. i'll post code if i'll have time

Re: ragdoll [Re: Shadow969] #147911
08/21/07 15:31
08/21/07 15:31
Joined: Mar 2004
Posts: 281
England
frescosteve Offline OP
Member
frescosteve  Offline OP
Member

Joined: Mar 2004
Posts: 281
England
I really badly need that code

Re: ragdoll [Re: frescosteve] #147912
08/21/07 16:35
08/21/07 16:35
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
ENTITY* create_bone(ENTITY* ent, STRING* parent, STRING* child)
{
VECTOR parent_pos;
VECTOR child_pos;
ANGLE bone_ang;
ENTITY* temp_bone;

vec_for_bone(parent_pos,ent,parent);
vec_for_bone(child_pos,ent,child);

vec_sub(child_pos,parent_pos);
vec_to_angle(bone_ang,child_pos);

temp_bone = ent_create("crate.mdl",parent_pos,0);
vec_set(temp_bone.pan,bone_ang);
temp_bone.scale_x = 0.1;
temp_bone.scale_y = 0.1;
temp_bone.scale_z = 0.1;
return(temp_bone);
}

use it like this

create_bone(doll,"ValveBiped.Bip01~17","ValveBiped.Bip01~18");
you = create_bone(doll,"ValveBiped.Bip01~30","ValveBiped.Bip01~31");
create_bone(doll,"ValveBiped.Bip01~11","ValveBiped.Bip01~12");
wait(-7);
ent_remove(you);//remove 2nd bone in 7 seconds for testing

Re: ragdoll [Re: Shadow969] #147913
08/22/07 17:27
08/22/07 17:27
Joined: Mar 2004
Posts: 281
England
frescosteve Offline OP
Member
frescosteve  Offline OP
Member

Joined: Mar 2004
Posts: 281
England
Thanks for that code. I have modified it so it can work with my game. I do have another question. How do you update the bones position and angle according to where the new models position is?

I have enabled physics on each of the new models (at each bone parent) but I cant figure out the code to update the bone position on the model according to the parent position models.

Each parent model has its own action.

Last edited by frescosteve; 08/22/07 17:28.
Page 1 of 3 1 2 3

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