Usage:
ObjectTemplate.SetRotation
x/y/z
Argument values:
argument 1: | -0.051/-6.935/0.94, -0.081/8.943/-1.016, -0.348/-0.638/0, -0.5/0.5/0, -0.518/0/0, -0.70/0/-89.999, -0.798/-4.974/9.62, -0.82/-26.252/179.28, -1.212/-2.2/-45.815, -1.645/29.312/-0.433, -10.999/-0.103/8.5, ... |
Description: SetRotation sets the direction and angles of a child object attached to the current object by the AddTemplate command. The angle is in terms of yaw/pitch/roll. You are looking down the Z axis and Y is up, X to the right. Imagine turning your head to left, then the right. Your head is rotating in the XZ axis, the first parameter (aka yaw). Now imagine looking up, then down. Now your head is rotating in the YZ axis, the second parameter (aka pitch). Now, keep looking forward, but tilt your head to the left, then right. It is rotating in the XY axis, the last parameter (aka roll). The units used for this parameter are degrees (1 - 360) but you can have negative degrees as well. If you define multiple rotations, they happen in this order.
The angle is relative to the orientation of the parent object. If this command is omitted, the angles will be at 0/0/0.
Related properties: AddTemplate, SetPosition, SetAcceleration, SetMinRotation, SetMaxRotation, SetMaxSpeed
Used in object types (and how often in each type): AnimatedBundle (3%), Bundle (50%), ControlPoint (1%), EffectBundle (29%), Engine (26%), FireArms (41%), HandFireArms (60%), LandingGear (5%), LodObject (3%), Obstacle (100%), PlayerControlObject (25%), Projectile (5%), RotationalBundle (20%), Spring (1%), simpleobject (1%)
Used in a total of 516 .con files: Allies_eastairfield_spawn.con, Allies_factory_spawn.con, Allies_westairfield_spawn.con, Controlpointtemplates.con, Effects.con, Objects.con, Physics.con, Weapons.con
Parent directories of these .con files: objects/Vehicles, objects/Vegetation, objects/Stationary_Weapons, objects/Objectives, objects/MOVE_FILES, objects/HandWeapons, objects/Effects, objects/Buildings, Bf1942/Levels
Example: (from objects/Vehicles/Sea/Hatsuzuki/Objects.con)
rem *** Hatsuzuki ***
ObjectTemplate.Create PlayerControlObject Hatsuzuki
ObjectTemplate.SetNetworkableInfo HatsuzukiBodyInfo
ObjectTemplate.SaveInSeparateFile 1
ObjectTemplate.HasMobilePhysics 1
ObjectTemplate.Drag 0.92
ObjectTemplate.Mass 2500000
ObjectTemplate.HasCollisionPhysics 1
ObjectTemplate.HasResponsePhysics 1
ObjectTemplate.HasArmor 1
ObjectTemplate.Hitpoints 300
ObjectTemplate.Maxhitpoints 300
ObjectTemplate.Material 55
ObjectTemplate.CriticalDamage 50
ObjectTemplate.HpLostWhileCriticalDamage 10
ObjectTemplate.ExplosionForceMod 8
ObjectTemplate.DontClearTeamOnExit 1
ObjectTemplate.AddArmorEffect 200 em_ExFumePOW 0/20/-1
ObjectTemplate.AddArmorEffect 200 em_ExFumePOW 0/20/-1
ObjectTemplate.AddArmorEffect 150 e_HatsuzukiDamage 0/0/0
ObjectTemplate.AddArmorEffect 150 e_HatsuzukiDamage 0/0/0
ObjectTemplate.AddArmorEffect 100 e_waterBoatSink 0/10/0
ObjectTemplate.AddArmorEffect 100 e_HatsuzukiDamage 0/0/0
ObjectTemplate.AddArmorEffect 100 e_HatsuzukiDamage 0/0/0
ObjectTemplate.AddArmorEffect 50 e_HatsuzukiDamage 0/0/0
ObjectTemplate.AddArmorEffect 50 e_waterBoatSink 0/10/0
ObjectTemplate.AddArmorEffect 50 e_waterBoatSinkEf 0/2/-5
ObjectTemplate.AddArmorEffect 50 e_waterBoatSinkEf 0/2/32
ObjectTemplate.AddArmorEffect 50 e_waterBoatSinkEf 0/2/-35
ObjectTemplate.AiTemplate HatsuzukiAI
rem -------------------------------------
ObjectTemplate.AddTemplate lodHatsuzuki
ObjectTemplate.AddTemplate HatsuzukiFloater
ObjectTemplate.SetPosition -1.999/9.5/50
ObjectTemplate.AddTemplate HatsuzukiFloater
ObjectTemplate.SetPosition 2/9.5/50
ObjectTemplate.AddTemplate HatsuzukiFloater
ObjectTemplate.SetPosition -4.999/9.5/17
ObjectTemplate.AddTemplate HatsuzukiFloater
ObjectTemplate.SetPosition 5/9.5/17
ObjectTemplate.AddTemplate HatsuzukiFloater
ObjectTemplate.SetPosition -4.999/9.5/-16.999
ObjectTemplate.AddTemplate HatsuzukiFloater
ObjectTemplate.SetPosition 5/9.5/-16.999
ObjectTemplate.AddTemplate HatsuzukiFloater
ObjectTemplate.SetPosition -1.999/9.5/-49.999
ObjectTemplate.AddTemplate HatsuzukiFloater
ObjectTemplate.SetPosition 2/9.5/-49.999
ObjectTemplate.AddTemplate HatsuzukiDriverSoldierSpawn
ObjectTemplate.SetPosition 0/12/26
ObjectTemplate.AddTemplate HatsuzukiSoldierSpawn
ObjectTemplate.SetPosition 4/9.4/-57
ObjectTemplate.AddTemplate HatsuzukiSoldierSpawn
ObjectTemplate.SetPosition -4/9.4/-57
ObjectTemplate.AddTemplate HatsuzukiDaihatsuSpawner
ObjectTemplate.SetPosition -7.7/8.55/-56.25
ObjectTemplate.SetRotation -3/0/0
ObjectTemplate.AddTemplate HatsuzukiDaihatsuSpawner
ObjectTemplate.SetPosition 7.7/8.55/-56.25
ObjectTemplate.SetRotation 3/0/0
rem -------------------------------------
ObjectTemplate.SetPcoId 0
ObjectTemplate.AddPcoPosId 1
ObjectTemplate.SonarPos 1
ObjectTemplate.SetSoldierExitLocation 0/12/26 0/0/0
ObjectTemplate.GUIIndex 91
ObjectTemplate.SetVehicleIcon "Vehicle/Icon_hatsuzuki.tga"
ObjectTemplate.SetVehicleIconPos 85/90
ObjectTemplate.SetNumberOfWeaponIcons 2
ObjectTemplate.SetPrimaryAmmoIcon "Ammo/Icon_cannon.tga"
ObjectTemplate.SetPrimaryAmmoBar ABReloadBarOnly
ObjectTemplate.SetSecondaryAmmoIcon "Ammo/Icon_depthcharge.tga"
ObjectTemplate.SetSecondaryAmmoBar ABAmmoBarReloadBar
ObjectTemplate.SetCrossHairType CHTIcon
ObjectTemplate.SetVehicleCategory VCSea
ObjectTemplate.SetVehicleType VTDestroyer
ObjectTemplate.SetToolTipType TTDestroyer
ObjectTemplate.SetMinimapIcon "Minimap/minimap_icon_destoyer_32x32.tga"
ObjectTemplate.SetMinimapIconSize 32
Go to the ObjectTemplate properties list page, ObjectTemplate page, All Properties list, or Main scripting page.