Posted: 18th Jun 2021 18:46
Hi everyone! I stumbled upon some problem when converting objects to mesh give unpleasant results i manage to solved this problem and dicided sharing this solution with you guys. Look at pictures bellow converting objects before and after.
This thing suck many many blood from me so i was very surprised how easy it's to solve...

+ Code Snippet
function fixstaticmesh(obj)
if obj>0
if object exist(obj)
maxlimbobj=get limb count(obj)
for l=0 to maxlimbobj
if get limb child(obj,l)=-1
rotate limb obj,l,limb direction x(obj,l),limb direction y(obj,l),limb direction z(obj,l)
offset limb obj,l,limb position x(obj,l),limb position y(obj,l),limb position z(obj,l)
else
rotate limb obj,l,0,0,0 : offset limb obj,l,0,0,0
endif
next l
endif
endif
endfunction


Posted: 18th Jun 2021 18:59
I forgot that this called "limbs"not "bones" sorry for this typo english is my second language...
Posted: 18th Jun 2021 19:04
Also forgot to mention that it requires "Matrix 1Util_12" to work.
Posted: 20th Jun 2021 19:58
One more fix old code did not worked with a generator from fps creator a new code takes to a count sibling limbs.

+ Code Snippet
function fixstaticmesh(obj)
if obj>0
if object exist(obj)
maxlimbobj=get limb count(obj)
for l=0 to maxlimbobj
if get limb child(obj,l)=-1
sibl=get limb sibling(obj,l)
parent=get limb parent(obj,l)
if sibl>-1
offset limb obj,l,limb position x(obj,sibl),limb position y(obj,sibl),limb position z(obj,sibl)
else
if parent=-1
offset limb obj,l,limb position x(obj,l),limb position y(obj,l),limb position z(obj,l)
else
offset limb obj,l,limb position x(obj,parent),limb position y(obj,parent),limb position z(obj,parent)
endif
endif
rotate limb obj,l,limb direction x(obj,l),limb direction y(obj,l),limb direction z(obj,l)
else
rotate limb obj,l,0,0,0 : offset limb obj,l,0,0,0
endif
next l
endif
endif
endfunction

Posted: 20th Jun 2021 20:56
nah still dont work properly