Help!!!! how do you nswitch parenting in game engine

That’s really cool! One thing though, I found a small error in the col.py text script. It kept boucing off and I looked at the python console and found the error; the line used to read:

 inv = mat.invert(hitMat) 

All I did was change it to read:

 inv = mat.invert2(hitMat) 

(For all I know it could have been only me, but I thought I would let you know just in case.) After that it worked great, good job and thanks for the translated tutorial!

Repaired in demo file! I did some testing and forgot to rename this function back to invert(). While Blender is open, it doesn’t complain about missing function (I think it keeps it in compiled form). But when it’s closed and reopened, it doesn’t find a function and issues error message.

Cool, that’s really neat demo! 8)
It runs well in blender, but whenever I export a runtime of it it doesn’t run properly. Specificly the arrows do not stick to the target; they only bounce off. Does anyone know why?
It’s like it can’t run all your python scripts or something. :-?

I have found out that blenderplayer doesn’t have access to python modules defined inside .blend file. So save mat.py as file to the same folder, as resulting exe. When game is started, mat.py will be compiled to mat.pyc. In fact, you can distribute only this compiled file with exe.

Ah, excellent, I had a feeling it would be something like that. I went ahead and saved all the python scripts from that .blend as .py and now it works! It looks like it only converted a couple (2) of .py into new .pyc files so I don’t think I needed to export all of them, but “better safe than sorry” is generaly the best stratagy. :wink: Thanks you guys. :smiley: