how spawn skinned ragdolls in bge?have .blend a video Please Help me

I did only physics visualizations the armature contrains in mesh not working.

I have a rigid body objects with 15 rigid joint constrains parts this is work after instanced group created but armature with 15 bones lost constrains of copyLocation and copyRotation. This cause mesh not deforming like rigid body.

Using bpy can solve this? I will work in runtime.

This is my blend edited all cleared with instanced group created for put the code retarget
download the folder have a texture zombie too.

In this code please look i think need just known how change mathutils object vector to target vector



import bge
import math
from math import *
import mathutils

t = 0

def rotate():
global t
# Get the whole bge scene
scene = bge.logic.getCurrentScene()
# Helper vars for convenience
source = scene.objects

# Get the whole Armature

main_arm = source.get('Armature')

ob = bge.logic.getCurrentController().owner

x = math.sin(t)
ob.channels['Bone.000'].joint_rotation = mathutils.Vector([0,0,math.tanh(-x)])
ob.channels['Bone.001'].joint_rotation = mathutils.Vector([0,0,math.tanh(x)])
ob.channels['Bone.002'].joint_rotation = mathutils.Vector([0,math.tanh(x),0])
ob.update()

for mesh follow the bone with weight p.
If you know how please help
Anybody can give me example?
Thanks a lot

hi linuxfree

some link to youtube tuto :

ThaTimst3r
How to make a skinned rag-doll in BGE [Logic bricks]

john hamilton


Creating a game in Blender Part 3 - BGE Tutorial
used in : bgmc18 infinno fall devlog

I know how create rag doll the problem in bge its spawn to current layer the constrains losted and i,m using blender 2.79 please look video. Its show physics but constrains of rigid body to pose not working after create instanced group.

Did you add a run armature action on the armature with some dummy action. I think there is still something that needs to trigger the armature to run in order for all the constraints to apply properly. Hope it helps, has been ages since I last played with rigging armatures to ragdolls

Its a skinned ragdoll not have a rig armature.just armature consturct with copy edit bones.The front zombie work correctly the problem is after instanced group dupli-group the constraints losted
Blender not solved that yet understand friend? Your script have errors with cant modifield reverse( ) and key armature not in list.

If you know how constrains copy location and copy rotation can work with instanced group please help

a good test.

spawn multiple copies of a armature with copy rotation constraints

use armature.constraints[‘CopyLocationConstraint’].target = some game object
on a single armature instance, and if the other instances are uneffected you can simply spawn the armature, and ragdoll group seperate and use python to bind the constraints during runtime.

But friend i select object rigid body to bone in pose mode one by one for create constraints.your test will work with constraints in pose mode with apply pose as rest pose? Remmember this is a skinned ragdoll not have other armature riged.i just create armature in edit mode mode copyng bones one by one understand?

first add a property to the armature ‘armatureTag’

try spawn a group with


import bge
cont = bge.logicGetCurrentController()
own = cont.owner
added = own.scene.addObject('Armature',own,0)
for obj in added.groupMembers:
    if 'armatureTag' in obj:
        armature = obj
        print('found armature')
        for constraint in armature.constraints:
             target = constraint.name+'Tag'
             for obj2 in added.groupMembers:
                 if target in obj2:
                      constraint.target = obj2
                      print('rebound constraint target')
        break

you have to add a property to each ragdoll bone that is used for the constraint to retarget to

‘CopyRotationUpperLeftArmTag’

'CopyRotationUpperRightArmTag"

etc.

constraint.name+‘Tag’

(this is how each constraint can rebind it’s target to the unique group instance*)

Friend if you wish i can post a .blend file here with just rigid body joints and constraints and you give just one bone working with instanced group with your script and i will repeat for all cause is very confuse to me work with armature and bone individual i dont understand amrature was created in bone edit mode but constrains with pose mode finalized apllying pose as rest pose.

Help you if i send a .blend file?

This is my blend edited all cleared with instanced group created for put the code retarget
download the folder have a texture zombie too.

Just give 1 example of one bone spawned with constraints working and i will repeat for all 14 bones with constraints.
Thanks a lot

try if possible test in your BRIK implementation kit and tell me if worked

This is my blend edited all cleared with instanced group created for put the code retarget
download the folder have a texture zombie too.
http://www.mediafire.com/folder/7stams581tjrl/new
Just give 1 example of one bone spawned with constraints working and i will repeat for all 14 bones with constraints.
Thanks a lot

Maybe you should ask author of this video?

In this video i dont look none mesh or armture.have just a rigid bodies with sphere,cilinders and cube rigid bodies spawn no ragdoll with armature and mesh understand?

where i put this code?

in Armature?

the instanced group with armature and mesh parented need stay on a hiden layer?

put it in the group object instance duplicate

add the property ‘armatureTag’ to the armature

for each constraint that will target a object add the property ‘NameOfConstraint’+‘Tag’

like upperRightArmCopyRotationTag -> in the upper arm ragbone.

cant understand

for each constraint that will target a object add the property ‘NameOfConstraint’+‘Tag’

like upperRightArmCopyRotationTag -> in the upper arm ragbone.

add Armature cant not in hidden layer friend
the property i need put 15 properties(have 15 bones constraints) ‘NameOfConstraint’+‘Tag’ in group object instance duplicate?

do you can look my .blend file for clarify points?

In line 5 type error “None Type” object is not iterable

the object your adding needs to be a part of a group (thing that makes lines green)

please look my .blend file

This is my blend edited all cleared with instanced group created for put the code retarget
download the folder have a texture zombie too.