setObjectCollisionScale()
Purpose
Set the scale of a 3D object's collision boundaries
Syntax
setObjectCollisionScale( handle, scale )
Arguments
handle variable which stores the placed 3D object
scale vector containing the scale factors in 3 dimensions { x, y, z }
Example
scale = { 1, 1, 1, 1 }
showObjectBounds( true, white, 2 )
object = plaeObject( cube, {}, { 1, 1, 1 } )
setCamera( { -8, 3, 0 }, { 0, 0, 0 } )
worldLight( { 0, -1, 0 }, white, 2 )
loop
clear()
c = controls( 0 )
scale += c.ly * 0.1
setObjectCollisionScale( object, scale )
rotateObject( object, { 0, 1, 0 }, 0.5 )
drawObjects()
oldc = c
printAt( 0, 0, "Push the left control stick up or down to adjust collision box scale" )
printAt( 0, 2, "Collision scale: ", scale )
update()
repeat
Associated Commands
drawObjects(), placeObject(), removeObject(), rotateObject(), setObjectMaterial(), setObjectPos(), showObjectBounds()