ObjectTemplate.SetMinRotation

From Pilot_51's Wiki
Jump to navigation Jump to search

MDT description

When used in Objects.con, sets the minimum rotation angles in degrees for an object, from its initial position. This and SetMaxRotation define the range of motion of any object, be it a gun emplacement, a view out of a vehicle, etc. The first value is the yaw rotation, i.e. how much you can turn your head left or right. The second value is the pitch rotation, i.e. how much you can nod up and down. The last number is the backwards movement of the object such as an Engine, or the minimum roll rotation (e.g. for a steering wheel).

When used in Physics.con in an Engine, SetMinRotation and SetMaxRotation for the Engine set how fine the control scale is for the engine (basically how many distinct speeds the engine can be at). For example, a SetMinRotation of -100 and SetMaxRotation of 200 means that the total speed is split into 100 different speeds for reversing and and 200 different speeds for going forward (so feasibly you could control the engine in such a way as to be able to go at 200 different speeds but none between them).

If you set the engine to SetAutomaticReset 0 and then set SetMinRotation to -1 and SetMaxRotation to 1 then basically if you press forward once, your car will speed up till maximum speed is reached, pressing back once will basically make your car just set throttle to 0 so you will come to a stop eventually, pressing back again will reverse. Basically having -1 and 1 makes it so that the engine has 3 different positions that it can be in (Forward, idle, reverse). Although the engine will take a while to get up to max speed, set by the differential and torque, your input to the engine is going to be either full reverse, idle or full forward.

If you use -2 and 2, then you have 5 settings: full reverse, half reverse, idle, half forward, full foward.

All these settings (SetMinRotation, SetMaxRotation, SetMaxSpeed, and SetAcceleration) control how an engine responds to player input, they do not otherwise change the speed chracteristics of a vehicle in any other way.

Source and more details

Additional Description