3d object

Blitz3D Forums/Blitz3D Beginners Area/3d object

panton(Posted 2007) [#1]
how to put a 3d model on a other object (and when that
object moves,then the 3d model haves to "follows it"
how to make something like that


TomToad(Posted 2007) [#2]
That's what the Parent parameter is for.
Example
Body = LoadMesh("Body.b3d")
LeftArm = LoadMesh("LeftArm.b3d",Body)

Now whenever Body is moved, LeftArm will follow.
If the two entities are already loaded in, then use:
EntityParent LeftArm,Body



panton(Posted 2007) [#3]
ok thanks


Mortiis(Posted 2007) [#4]
If you have a boned b3d mesh then you can;

Player = LoadAnimMesh("Player.b3d")  ;Load the player
Player_rightHand = FindChild(Player, "bone_rightHand")  ;Find the right hand bone

Sword = LoadMesh("Sword.b3d", Player_rightHand)  ;Load a sword model and attach it to the right hand bone.


attach things like this.


panton(Posted 2007) [#5]
yes it works, thanks


Mr. Slat(Posted 2007) [#6]
How can you position the sword, and still following the right arm? it may happen that the sword may not be were you want.


Dreamora(Posted 2007) [#7]
Mesh commands modify the geometric data, use them.
Or just create the art correctly up front. It will be attached at the 0,0,0 point so make sure that the holding point of your item is there.