Harry
Member
|
Crazy ragdoll
Is it normal that ragdolls are so crazy in current version of Engine? I remember in the past they were more stable.
Attached gif is created from Game Basics/Ragdoll tutorial. I only added dot which shows character position.
By the way skel.pos() seems to return the same position even if I set root bone to Warrior skeleton. Is it a bug or my bad understanding?
|
|
02-15-2020 08:57 PM |
|
Harry
Member
|
RE: Crazy ragdoll
Hi, I've been further inspecting ragdolls and found issue in Chr class.
The ragdollEnable() function first deactivates actor and then activates ragdoll. The order of execution seems to be wrong because actor deactivation puts it to sleep and sleep() function clears linear and angular velocity. Velocity, which is later passed to ragdoll.fromSkel(). Because of that ragdoll always has the velocity equals to zero.
|
|
02-16-2020 08:49 PM |
|
Esenthel
Administrator
|
|
02-18-2020 06:07 AM |
|
Esenthel
Administrator
|
RE: Crazy ragdoll
Quote:By the way skel.pos() seems to return the same position even if I set root bone to Warrior skeleton. Is it a bug or my bad understanding?
I don't understand.
using this code:
Code:
void Draw()
{
Renderer(Render);
D.text(0, 0.9, "Press WSAD keys to move, 1/2 to pick up/drop item, Alt to grab");
if(Players.elms())D.text(0, 0.8, S+"Items in inventory : "+Players[0].items.elms());
if(Players.elms())
{
SetMatrix();
Players[0].skel.pos().draw(RED);
}
}
in
UID(1053171485, 1309531958, 4017451414, 3813904741) /* Apps\14 - Game Basics\03 - World with Character */
tutorial, works fine
skel.pos() is not changed due to ragdoll.
Only its bones (sub-elements) are changed.
|
|
02-18-2020 06:10 AM |
|
Esenthel
Administrator
|
RE: Crazy ragdoll
On the picture selecting root affects root animation key frames when importing animations.
Root bone is always Matrix Identity (Vec 0,0,0 position) in object space.
|
|
02-19-2020 02:00 AM |
|
Harry
Member
|
RE: Crazy ragdoll
Thank you for the explanation.
|
|
02-19-2020 10:21 PM |
|