Off-Center Rotation and Turrets for Vehicles

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Scaatis
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Sep 01, 2017 1:39 pm
Contact:

Off-Center Rotation and Turrets for Vehicles

Post by Scaatis »

I'm kind of new to modding, so correct me if I missed something obvious.

Currently, cars have two major restrictions: Their bounding box always rotates around its center, not around the coordinate origin (0, 0). In addition, turrets also rotate around the vehicle's bounding box center (but can be shifted up with the shift paramter of the sprite). This puts major limitations on the vehicle design. Vehicles differing from the norm have to be made as multiple entities, which adds a lot of lua overhead.

Proposed Change:
  • Allow specifying off-center bounding boxes, such as {{-1, -1}, {2, 2}}, whereas all current bounding boxes are centered, such as {{-1, -1}, {1, 1}}. When turning, the vehicle's bounding box rotates around (0, 0).
  • Add a turret_position argument to the car prototype, similar to the position argument of burner smoke, which allows the turret to be mounted anywhere on the vehicle and rotate with it.
d3x0r
Filter Inserter
Filter Inserter
Posts: 316
Joined: Sun Jun 04, 2017 8:56 am
Contact:

Re: Off-Center Rotation and Turrets for Vehicles

Post by d3x0r »

it actualy stays centered around the X axis, and shifts on the Y axis...

viewtopic.php?f=28&t=51212

noone cars though... they surely have done some kind of magic to make soemthing work that fixing it would break other things.
Post Reply

Return to “Modding interface requests”