Interface IBaseObject.IManagedInterface
Represents the managed interface implemented by its unmanaged counterpart.
public interface IBaseObject.IManagedInterface : IUnmanagedInterface
- Inherited Members
Methods
AttachToVehicle(IVehicle, Vector3, Vector3)
Attaches the object to a vehicle at the specified offset and rotation.
void AttachToVehicle(IVehicle vehicle, Vector3 offset, Vector3 rotation)
Parameters
vehicleIVehicleThe vehicle to attach the object to.
offsetVector3The offset from the vehicle's center.
rotationVector3The rotation of the object relative to the vehicle.
GetAttachmentData()
Gets the attachment data of the object.
ref ObjectAttachmentData GetAttachmentData()
Returns
- ObjectAttachmentData
A reference to the ObjectAttachmentData structure containing the attachment information.
GetCameraCollision()
Gets whether the object has camera collision enabled.
bool GetCameraCollision()
Returns
- bool
trueif the object has camera collision enabled; otherwise,false.
GetDrawDistance()
Gets the draw distance of the object.
float GetDrawDistance()
Returns
- float
The draw distance in units.
GetMaterialData(uint, out ObjectMaterialData?)
Gets the material data for a specific material index on the object.
bool GetMaterialData(uint materialIndex, out ObjectMaterialData? output)
Parameters
materialIndexuintThe index of the material to retrieve.
outputObjectMaterialDataWhen the method returns, contains the material data if successful; otherwise,
null.
Returns
- bool
trueif the material data was retrieved successfully; otherwise,false.
GetModel()
Gets the model ID of the object.
int GetModel()
Returns
- int
The model ID of the object.
GetMovingData()
Gets the current movement data of the object.
ref ObjectMoveData GetMovingData()
Returns
- ObjectMoveData
A reference to the ObjectMoveData structure containing the movement information.
IsMoving()
Checks if the object is currently moving.
bool IsMoving()
Returns
- bool
trueif the object is moving; otherwise,false.
Move(ref ObjectMoveData)
Moves the object to a new position and rotation over a specified time.
void Move(ref ObjectMoveData data)
Parameters
dataObjectMoveDataThe movement data containing the target position, rotation, and time.
ResetAttachment()
Resets the object's attachment, removing it from any vehicle or object it was attached to.
void ResetAttachment()
SetCameraCollision(bool)
Sets whether the object has camera collision enabled.
void SetCameraCollision(bool collision)
Parameters
collisionbooltrueto enable camera collision; otherwise,false.
SetDrawDistance(float)
Sets the draw distance for the object.
void SetDrawDistance(float drawDistance)
Parameters
drawDistancefloatThe draw distance in units.
SetMaterial(uint, int, string, string, Colour)
Sets the material for a specific material index on the object.
void SetMaterial(uint materialIndex, int model, string textureLibrary, string textureName, Colour colour)
Parameters
materialIndexuintThe index of the material to set.
modelintThe model ID to use for the texture library.
textureLibrarystringThe texture library (TXD) name.
textureNamestringThe texture name from the library.
colourColourThe colour to apply to the material.
SetMaterialText(uint, string, ObjectMaterialSize, string, int, bool, Colour, Colour, ObjectMaterialTextAlign)
Sets text material on a specific material index of the object.
void SetMaterialText(uint materialIndex, string text, ObjectMaterialSize materialSize, string fontFace, int fontSize, bool bold, Colour fontColour, Colour backgroundColour, ObjectMaterialTextAlign align)
Parameters
materialIndexuintThe index of the material to set text on.
textstringThe text to display on the material.
materialSizeObjectMaterialSizeThe size of the material.
fontFacestringThe font face to use for the text.
fontSizeintThe font size for the text.
boldbooltrueto make the text bold; otherwise,false.fontColourColourThe colour of the text.
backgroundColourColourThe background colour of the material.
alignObjectMaterialTextAlignThe text alignment on the material.
SetModel(int)
Sets the model ID of the object.
void SetModel(int model)
Parameters
modelintThe model ID of the object.
Stop()
Stops the object's current movement.
void Stop()