3D_CHAIN_BREAK

3D_CHAIN_BREAK N,P

BREAKS THE CHAIN OF THE 3D OBJECT NUMBER N TO THE 3D OBJECT NUMBER P

  • Type: Command
  • Parameters: 2
  • Group: 3D Objects

ACTION

The command 3D_CHAIN_BREAK breaks the hierarchical link between the 3D object designated by its number N and the 3D object designated by its number P which has been created by the command 3D_CHAIN N,P.

The moves of the 3D object number P are not linked any longer to the moves of the 3D object N, and all the moves that the 3D object number N has been subjected during its link are cancelled. The 3D object number N get back its own position.

SYNTAX: 3D_CHAIN_BREAK N,P

  • N = 3D object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of 3D objects.
  • P = 3D object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of 3D objects.

USE

  • The command 3D_CHAIN_BREAK is used in order that a 3D object stops to follow the moves of another 3D object.

ERROR

  • If number N or number P is not a correct expression.
  • If number N or number P exceeds the allowed maximum number of 3D objects.
  • If number N or number P is not greater than 0.
  • If 3D object number N does not exist.
  • If 3D object number P does not exist.
  • If N=P.
  • If 3D object number N is not chained to 3D object number P.

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

SEE ALSO

3D_CHAIN