function createConeConstraintEx( actorA, actorB, rbAFrame_matrix, rbBFrame_matrix)

The Cone Constraint is a type of joint constraint used to simulate realistic rotational movement between two actors (or between an actor and the world) with specific angular limits. This constraint is especially useful for simulating ball-and-socket joints with some twisting freedom but restricted cone-like movement, such as human shoulders or robotic arms.

actorA = CreateCubeActor(100) 
actorB = CreateCubeActor(100) 
  
rbA = DimMatrix(44) 'A transform matrix should be a 4x4 matrix
SetIdentityMatrix(rbA, 4) 'This will set rbA to a 4x4 identity matrix
SetMatrixTranslation(rbA, 0400) 'Set the point where the constraint connects to actorA to 1 unit above its origin
SetMatrixRotation(rbA, 000) 'Sets the angle the constraint is attached at to 0 on all axes
  
rbB = DimMatrix(44) 'A transform matrix should be a 4x4 matrix
SetIdentityMatrix(rbB, 4) 'This will set rbA to a 4x4 identity matrix
SetMatrixTranslation(rbB, 0400) 'Set the point where the constraint connects to actorA to 1 unit above its origin
SetMatrixRotation(rbB, 000) 'Sets the angle the constraint is attached at to 0 on all axes
  
test_cone = CreateConeConstraint( actorA, rbA ) 


Related: CreateConeConstraint SetIdentityMatrix SetMatrixTranslation SetMatrixRotation