HIDE OBJECT This command will hide the specified 3D object from view.
Syntax
    HIDE OBJECT Object Number
Parameters
    Object Number
Integer The object number
Returns
This command does not return a value.
Description
You can substantially increase the performance of your 3D program if you hide objects whenever possible. The contents of a room behind a closed door can be hidden for as long as the door remains closed, allowing your program to run much faster and improve overall performance. The parameter should be specified using an integer value.
Example Code
    hide mouse:cls 0:autocam off

    ObjectNumber=1

    SecondObject=2

    ImageNumber=1

    make object sphere SecondObject,1

    load object "models\model.x",ObjectNumber

    load image "iron.jpg",ImageNumber

    append object "models\extraanim.x", ObjectNumber, total object frames(ObjectNumber)+1

    set object interpolation ObjectNumber,50

    position object ObjectNumber,0,0,0

    position object SecondObject,0,0,0

    position camera 0,2,4

    point camera 0,0,0

    while mouseclick()=0

    set cursor 0,0

    print "press r to show object"

    if inkey$()="r" then show object ObjectNumber

    print "press t to hide object"

    if inkey$()="t" then hide object ObjectNumber

    endwhile

    while mouseclick()=1:endwhile

    if object exist(ObjectNumber)=1 then delete object ObjectNumber

    if object exist(SecondObject)=1 then delete object SecondObject

    if image exist(ImageNumber)=1 then delete image ImageNumber

    end
See also
BASIC3D Commands Menu Index