முதன்மை உள்ளடக்கத்துக்குச் செல்லவும்

SetObjectsDefaultCameraCollision

எச்சரிக்கை

செயல்பாடு என்பது omp v1.1.0.2612 பதிப்பில் சேர்க்கப்பட்டது. இது முந்தைய பதிப்புகளில் இயங்காது!

Description​

Allows camera collisions with newly created objects to be disabled by default.

NameDescription
bool:disabletrue 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​

குறிப்பு

This function only affects the camera collision of objects created AFTER its use - it does not toggle existing objects' camera collisions.

எச்சரிக்கை

This function ONLY works outside the normal SA map boundaries (past 3000 units).