CHAINS THE 3D OBJECT NUMBER N TO THE 3D OBJECT NUMBER P
ACTION
The command 3D_CHAIN set a hierarchical link between the 3D object designated by its number N and the 3D object designated by its number P : the moves of the 3D object number P are linked to the moves of the 3D object N.
It follows then the translations and rotations of the 3D object number N, but nevertheless, it can have its own moves.
The 3D object number N can be chained to only one 3D object, but several 3D objects can be chained to the same 3D object.
SYNTAX:
3D_CHAIN N,P
USE ERROR EXAMPLE
rem create a 3D world
scene3d 1
rem give it all the available space
full_space 1
rem create a cube (3D object number 1)
3d_cube 1,1
rem create another cube (3D object number 2)
3d_cube 2,1
rem move this cube
3d_x_position 2,3
rem color it
3d_color 2,200,0,0:wait 1000
rem chain the second cube to the first one
3d_chain 2,1
rem move the SECOND cube ONLY
3d_x_position 2,2.6:wait 1000
rem move the TWO cubes
3d_x_position 1,-2:wait 1000
rem rotate the TWO cubes
3d_z_rotate 1,10:wait 1000
rem break the chain
3d_chain_break 2,1:wait 1000
rem rotate the first cube : the second one is unchanged
3d_z_rotate 1,0
3D_CHAIN
3D_CHAIN N,P
SEE ALSO
3D_CHAIN_BREAK