User Tools

Site Tools


scripting:attachcameratoentity

AttachCameraToEntity()

Attaches a camera to a ingame entity


AttachCameraToEntity(vehicle, boneIndex, positionOffset, anglesOffset);

Common usage

CAMERA ATTACH TO VEHICLE

GenericEntity vehicle = GenericEntity.Cast(GetWorld().FindEntityByName("BTR1"));
int boneIndex = vehicle.GetBoneIndex("v_root");
vector positionOffset = Vector(-2.5, 1.5, 6.0);
vector anglesOffset = Vector(0, 180, 0);
AttachCameraToEntity(vehicle, boneIndex, positionOffset, anglesOffset);
scripting/attachcameratoentity.txt · Last modified: 2022/08/09 23:14 by jerryhopper

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki