note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
SetObjectsDefaultCameraCollision
warning
This function was added in omp v1.1.0.2612 and will not work in earlier versions!
Description
Allows camera collisions with newly created objects to be disabled by default.
Name | Description |
---|---|
bool:disable | true to disable camera collisions for newly created objects and false to enable them (enabled by default). |
Returns
Note
This function only affects the camera collision of objects created AFTER its use - it does not toggle existing objects' camera collisions.
Examples
public OnGameModeInit()
{
// Disable camera collision
SetObjectsDefaultCameraCollision(true);
// Create mapped objects
CreateObject(...);
CreateObject(...);
CreateObject(...);
CreateObject(...);
// The above objects will NOT have camera collisions
// Re-enable camera collisions
SetObjectsDefaultCameraCollision(false);
// Create mapped objects
CreateObject(...);
CreateObject(...);
CreateObject(...);
CreateObject(...);
// The above objects WILL have camera collision
// BUT, the first set will still NOT have camera collisions
return 1;
}
Notes
tip
This function only affects the camera collision of objects created AFTER its use - it does not toggle existing objects' camera collisions.
warning
This function ONLY works outside the normal SA map boundaries (past 3000 units).
Related Functions
- SetObjectNoCameraCollision: Disables collisions between camera and object.
- SetPlayerObjectNoCameraCollision: Disables collisions between camera and player object.