---
name: "CT OBJECT"
type: topic
source: https://community.bistudio.com/wiki/CT_OBJECT
revid: 373015
updated: 2025-03-18T09:44:42Z
---

# CT OBJECT

### Introduction

With this control type it is possible to integrate 3D objects into a dialog. For some more information you may want to look at this blog post by User:Killzone_Kid: http://killzonekid.com/arma-scripting-tutorials-gui-part-6/.

> [!IMPORTANT]
> The y and z values for the [vectorDir](../commands/vectorDir.md) ([direction](../topics/CT_OBJECT.md#direction) array) and [vectorUp](../commands/vectorUp.md) ([up](../topics/CT_OBJECT.md#up)) are switched.
>
> The control position can be defined with either 'position' property, which is an array or separate 'x', 'y' and 'z' properties, which are floats. If both are used, the former overrides the latter.

#### Related commands & functions

- Commands: General
- Commands: UI Eventhandlers
- Commands: Object

#### Related User Interface Eventhandlers

- [Events: General](../topics/User_Interface_Event_Handlers.md#generic-events)
- [onObjectMoved](../topics/User_Interface_Event_Handlers.md#onobjectmoved)

### Alphabetical Order

> [!NOTE]
> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found [**here**](../topics/Arma~3A_GUI_Configuration.md#common-properties).

> [!WARNING]
> Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with [this](https://github.com/7erra/BIKI.VR/blob/master/fnc/generateCTPage.sqf) config crawler.

```cpp
#define CT_OBJECT 80
```

#### B

##### boneHead

**Type:** String

**Description:** n/a

```cpp
boneHead = "head";
```

##### boneLEye

**Type:** String

**Description:** n/a

```cpp
boneLEye = "l_eye";
```

##### boneLEyelidDown

**Type:** String

**Description:** n/a

```cpp
boneLEyelidDown = "eye_lwl";
```

##### boneLEyelidUp

**Type:** String

**Description:** n/a

```cpp
boneLEyelidUp = "eye_upl";
```

##### boneLPupil

**Type:** String

**Description:** n/a

```cpp
boneLPupil = "l_pupila";
```

##### boneREye

**Type:** String

**Description:** n/a

```cpp
boneREye = "r_eye";
```

##### boneREyelidDown

**Type:** String

**Description:** n/a

```cpp
boneREyelidDown = "eye_lwr";
```

##### boneREyelidUp

**Type:** String

**Description:** n/a

```cpp
boneREyelidUp = "eye_upr";
```

##### boneRPupil

**Type:** String

**Description:** n/a

```cpp
boneRPupil = "r_pupila";
```

#### D

##### direction

**Type:** Array

**Description:** Equivalent of [vectorDir](../commands/vectorDir.md) with switched y and z values.

```cpp
direction[] = {1,0,0};
```

#### E

##### enableZoom

**Type:** Number

**Description:** Toggle the ability to double click on the object to zoom in or out.

```cpp
enableZoom = 1;
```

#### F

##### faceType

**Type:** String

**Description:** n/a

```cpp
faceType = "Man_A3";
```

#### I

##### inBack

**Type:** Number, String

**Description:** Determines which set of coordinates to use.

Number example:

```cpp
inBack = 0;
```

String example:

```cpp
inBack = "False";
```

#### M

##### model

**Type:** String

**Description:** Path to the to be used p3d file.

```cpp
model = "\A3\ui_f\objects\face_preview";
```

##### modelWoman

**Type:** String

**Description:** n/a

```cpp
modelWoman = "\A3\ui_f\objects\face_preview";
```

##### minGlobalLightIntensity

**Type:** Number

**Description:** n/a

```cpp
minGlobalLightIntensity = 0.25;
```

#### P

##### position

**Type:** Array

**Description:** Position of the object relative to [\[0,0\]](../topics/GUI_Coordinates.md) on the screen.

```cpp
position[] = {0,0,0.053};
```

#### S

##### scale

**Type:** Number

**Description:** Changes the size of the object.

```cpp
scale = 0.35;
```

##### selectionArrow

**Type:** String

**Description:** Compass object only.

```cpp
selectionArrow = "";
```

##### selectionDate1

**Type:** String

**Description:** Watch object only.

```cpp
selectionDate1 = "";
```

##### selectionDate2

**Type:** String

**Description:** Watch object only.

```cpp
selectionDate2 = "";
```

##### selectionEyelid

**Type:** String

**Description:** n/a

```cpp
selectionEyelid = "eyelids";
```

##### selectionGlasses

**Type:** String

**Description:** n/a

```cpp
selectionGlasses = "eyelids";
```

##### selectionLBrow

**Type:** String

**Description:** n/a

```cpp
selectionLBrow = "lBrow";
```

##### selectionLip

**Type:** String

**Description:** n/a

```cpp
selectionLip = "LLip";
```

##### selectionLMouth

**Type:** String

**Description:** n/a

```cpp
selectionLMouth = "lMouth";
```

##### selectionMBrow

**Type:** String

**Description:** n/a

```cpp
selectionMBrow = "mBrow";
```

##### selectionMMouth

**Type:** String

**Description:** n/a

```cpp
selectionMMouth = "mMouth";
```

##### selectionPersonality

**Type:** String

**Description:** n/a

```cpp
selectionPersonality = "personality";
```

##### selectionRBrow

**Type:** String

**Description:** n/a

```cpp
selectionRBrow = "rBrow";
```

##### selectionRMouth

**Type:** String

**Description:** n/a

```cpp
selectionRMouth = "rMouth";
```

#### U

##### up

**Type:** Array

**Description:** Equivalent to [vectorUp](../commands/vectorUp.md) command where y and z values are swapped.

```cpp
up[] = {0,1,0};
```

##### useGlobalLight

**Type:** Number

**Description:** Enables Global Illumination on the Object.

```cpp
useGlobalLight = 0;
```

#### W

##### waitForLoad

**Type:** Number

**Description:** n/a

```cpp
waitForLoad = 0;
```

#### X

##### xBack

**Type:** Number

**Description:** x [coordinate](../topics/GUI_Coordinates.md) of the object with `inBack = 1`.

```cpp
xBack = 0.6;
```

#### Y

##### yBack

**Type:** Number

**Description:** < [coordinate](../topics/GUI_Coordinates.md) of the object with `inBack = 1`.

```cpp
yBack = 0.5;
```

#### Z

##### z

**Type:** Number

**Description:** z [coordinate](../topics/GUI_Coordinates.md) of the object with `inBack = 0`.

```cpp
z = 0.2;
```

##### zBack

**Type:** Number

**Description:** z [coordinate](../topics/GUI_Coordinates.md) of the object with `inBack = 1`.

```cpp
zBack = 0.1;
```

##### zoomDuration

**Type:** Number

**Description:** How long the zooming animation takes.

```cpp
zoomDuration = 1;
```

### Default Classes

> [!NOTE]
> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`
>
> ---
>
> **Missions:** Since Arma 3 v2.02 one can use `import SomeClass;` to initialise a class (see the [import](../topics/import_~28Config~29.md) keyword).
>
> In older versions, use `"Default" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the [description.ext](../topics/Description.ext.md).

#### RscObject

```cpp
class RscObject
{
    access = 0;
    type = CT_OBJECT;
    scale = 1;
    direction[] = {0,0,1};
    up[] = {0,1,0};
    shadow = 0;
};
```

### Other examples

```cpp
class MyWatch
{
    idd = -1;
    class objects
    {
        class Watch /* : RscObject */
        {
            access = 0;
            shadow = 0;
            idc = 101;
            type = 80;
            model = "\core\watch\watch.p3d";
            selectionDate1 = "date1";
            selectionDate2 = "date2";
            selectionDay = "day";
            x = 0.7;
            xBack = 0.7;
            y = 0.12;
            yBack = 0.12;
            z = 0.22;
            zBack = 0.22;
            inBack = 0;
            enableZoom = 0;
            direction[] = { 0, 0, 1 };
            up[] = { 0, 1, 0 };
            zoomDuration = 1;
            scale = 0.7;
            waitForLoad = 0;
            class Animations
            {
                class WatchHour
                {
                    type = "rotation";
                    source = "clockHour";
                    selection = "hodinova";
                    axis = "osa";
                    memory = 1;
                    animPeriod = 0;
                    angle0 = 0;
                    angle1 = "rad 360";
                };
                class WatchMinute
                {
                    type = "rotation";
                    source = "clockMinute";
                    selection = "minutova";
                    axis = "osa";
                    memory = 1;
                    animPeriod = 0;
                    angle0 = 0;
                    angle1 = "rad 360";
                };
                class WatchSecond
                {
                    type = "rotation";
                    source = "clockSecond";
                    selection = "vterinova";
                    axis = "osa";
                    memory = 1;
                    animPeriod = 0;
                    angle0 = 0;
                    angle1 = "rad 360";
                };
            };
        };
    };
};
```

<sub>Source: [BI Community Wiki — CT OBJECT](https://community.bistudio.com/wiki/CT_OBJECT) (revision 373015).</sub>
