SLIDE_OBJECT
Moves the object step by step toward the target position at the given speed per axis, returning true once it arrives.
Call it every frame until it returns true.
Signature
BOOL SLIDE_OBJECT(Object object, float toX, float toY, float toZ, float speedX, float speedY, float speedZ, BOOL collision); // 0x2FDFF4107B8C1147 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | object | Object |
| 2 | toX | float |
| 3 | toY | float |
| 4 | toZ | float |
| 5 | speedX | float |
| 6 | speedY | float |
| 7 | speedZ | float |
| 8 | collision | BOOL |
Facts
| Name | SLIDE_OBJECT |
|---|---|
| Hash | 0x2FDFF4107B8C1147 |
| Namespace | |
| Returns | BOOL |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0x2FDFF4107B8C1147, -- SLIDE_OBJECT
0, -- Object object
0.0, -- float toX
0.0, -- float toY
0.0, -- float toZ
0.0, -- float speedX
0.0, -- float speedY
0.0, -- float speedZ
false -- BOOL collision
)
if result then
-- ...
end// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x2FDFF4107B8C1147", // SLIDE_OBJECT
0, // Object object
0.0, // float toX
0.0, // float toY
0.0, // float toZ
0.0, // float speedX
0.0, // float speedY
0.0, // float speedZ
false, // BOOL collision
Citizen.returnResultAnyway()
);
if (result) {
// ...
}bool result = Function.Call<bool>((Hash)0x2FDFF4107B8C1147, // SLIDE_OBJECT
0, // Object object
0.0f, // float toX
0.0f, // float toY
0.0f, // float toZ
0.0f, // float speedX
0.0f, // float speedY
0.0f, // float speedZ
false // BOOL collision
);Related OBJECT natives
- SET_ACTIVATE_OBJECT_PHYSICS_AS_SOON_AS_IT_IS_UNFROZEN
- SET_CUSTOM_TEXTURES_ON_OBJECT
- SET_FORCE_OBJECT_THIS_FRAME
- SET_OBJECT_ALLOW_LOW_LOD_BUOYANCY
- SET_OBJECT_PHYSICS_PARAMS
- SET_OBJECT_TAKES_DAMAGE_FROM_COLLIDING_WITH_BUILDINGS
- SET_OBJECT_TARGETTABLE
- SET_OBJECT_TINT_INDEX
- SET_STATE_OF_RAYFIRE_MAP_OBJECT
- SET_TEAM_PICKUP_OBJECT
- _DAMAGE_OBJECT_FRAGMENT_BY_INDEX
- _GET_LIGHT_INTENSITY_FROM_OBJECT
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.