---
title: Rubber
slug: rubber
description: Learn about the various variables and events associated with the VPX engine in this comprehensive document. From name and timer settings to collision properties and visibility, explore the wide range of properties covered. Gain insights into rotation angl
docTags: 
createdAt: 2019-11-29T05:23:24.000Z
---

## Variables

*Variables are items in vpx you can set, adjust or call.*

| Call                        | Detail                                                                                                                                                                    | Example |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| Name(string)                |                                                                                                                                                                           |         |
| TimerEnabled(bool)          |                                                                                                                                                                           |         |
| TimerInterval(int)          | set interval for triggering the timer (1 equals 1000 timer calls per second, 1000 equals 1 timer call per second, -1 makes it dependent on the FPS that a user can reach) |         |
| HasHitEvent(bool)           |                                                                                                                                                                           |         |
| Thickness(int)              |                                                                                                                                                                           |         |
| Collidable(bool)            |                                                                                                                                                                           |         |
| HitHeight(float)            | defines the collision height of a rubber (default is 25.0 midpoint of a standard ball with size 50)                                                                       |         |
| Material(string)            |                                                                                                                                                                           |         |
| Visible(bool)               |                                                                                                                                                                           |         |
| EnableStaticRendering(bool) | if set the rubber is only rendered once (like walls) any dynamic changes later won't have an effect. This is useful for static rubbers like rubbers on posts.             |         |
| Image(string)               | texture name                                                                                                                                                              |         |
| Elasticity(float)           |                                                                                                                                                                           |         |
| ElasticityFalloff(float)    |                                                                                                                                                                           |         |
| Friction(float)             | 0..1                                                                                                                                                                      |         |
| Scatter(float)              |                                                                                                                                                                           |         |
| RotX(float)                 | angle to rotate the whole rubber around the X axis                                                                                                                        |         |
| RotY(float)                 | angle to rotate the whole rubber around the Y axis                                                                                                                        |         |
| RotZ(float)                 | angle to rotate the whole rubber around the Z axis                                                                                                                        |         |
| EnableShowInEditor(bool)    | if set one cannot adjust the control points of the rubber but the rotation angles are applied to the rubber mesh in the editor.                                           |         |
| ReflectionEnabled(bool)     | default=true                                                                                                                                                              |         |
| UserValue(any)              | can store any user defined value for re-use later-on                                                                                                                      |         |

## Events

| Event   | Detail | Example |
| ------- | ------ | ------- |
| \_Init  |        |         |
| \_Hit   |        |         |
| \_Timer |        |         |

```javascript
        dispinterface IRubberEvents
        {
        properties:
        methods:
                [id(DISPID_GameEvents_Init)]  void Init();
                [id(DISPID_HitEvents_Hit)]  void Hit();
                [id(DISPID_TimerEvents_Timer)]  void Timer();
        }
```

