Repository navigation
Hit Types
imshooter edited this page Oct 17, 2026
·
1 revision
Every native that finds something gives its kind in an A3D_HIT and its id in hitid. The callback A3D_OnCollided gives them for what a moving object hit.
| Type | Value | hitid |
material |
|---|---|---|---|
A3D_HIT_MAP |
0 |
The model of the map object | The surface of the part hit |
A3D_HIT_OBJECT |
1 |
The physics object |
0 for spheres and boxes, the surface of the model for model shaped objects |
A3D_HIT_STATIC |
2 |
The static object | The surface of the part hit, 0 for boxes and cylinders |
A3D_HIT_PLAYER |
3 |
The player |
62, the surface PED
|
A3D_HIT_VEHICLE |
4 |
The vehicle |
63, the surface CAR
|
A3D_HIT_WATER |
5 |
0 |
0 |
A3D_HIT_ACTOR |
6 |
The actor |
62, the surface PED
|
A physics object or a static object id needs the tag back before use:
public A3D_OnCollided(Physic:physicid, A3D_HIT:type, hitid, Float:x, Float:y, Float:z, Float:speed) {
if (type == A3D_HIT_OBJECT) {
A3D_SetVelocity(Physic:hitid, 0.0, 0.0, 0.0);
}
return 1;
}A moving object shaped like a model moves with one surface, the one of the first part of its collision. A static object keeps the surface of each part. See Surfaces.
3DAndreas 0.7.1 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Routes
- Navigation mesh
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions