User Tools

Site Tools


scripting:attachcameratoentity

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting:attachcameratoentity [2022/08/09 14:56] jerryhopperscripting:attachcameratoentity [2022/08/09 23:14] (current) – [Example] jerryhopper
Line 1: Line 1:
-====== AttachCameraToEntity ======+====== AttachCameraToEntity() ======
  
  
Line 6: Line 6:
  
 AttachCameraToEntity(vehicle, boneIndex, positionOffset, anglesOffset); AttachCameraToEntity(vehicle, boneIndex, positionOffset, anglesOffset);
 +
 +
 +
 +===== Common usage =====
 +
 +CAMERA ATTACH TO VEHICLE
 +
 +<code>
 +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);
 +</code>
scripting/attachcameratoentity.1660053405.txt.gz · Last modified: 2022/08/09 14:56 by jerryhopper

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki