You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make vehicle_part::precalc into a tripoint, with z-level default to 0.
in displace_vehicle(), when a vehicle structural tile moves off a ramp, increment or decrement its precalc.z as appropriate. when the pivot point moves off a ramp, increment or decrement it's pos.z and decrement or increment precalc.z.
ie:
0. bike with pivot 0, 0 and frames [0,-1], [0,0], [0,1], wheels [0,-1] and [0,1], and unified control system [0,0].
0a. vehicle global pos is [23,24,0] with the wheel at [0,-1] on a >.
The bike moves north to [23,23,0] the wheel precalc becomes [0,-1,1], the next is still [0,0,0] and the last one is [0,1,0].
The vehicle keeps moving north, so the pivot moves up a z-level to [23,22,1] and the precalcs become [0,-1,0], [0,0,0], and [0,1,-1].
The vehicle keeps moving north, so the pivot becomes [23,21,1] and the precalcs become [0,-1,0], [0,0,0], and [0,1,0].
open questions:
what to do about vehicles that are wider than ramps?
ro-o\
|###| >
|###| >
ho-o/
center of a vehicle goes up a 2-wide ramp, including the pivot point but none of the wheels.
ro-o\
|###| <
|###| <
ho-o/
center of a vehicle down down a 2-wide ramp, including the pivot point but none of the wheels.
sensible solution:
a vehicle can only be split between z-levels while some part of the vehicle is on a ramp. when no part of the vehicle is on a ramp, relocate the vehicle's global_pos3.z to the average of the wheel's pos3.z and then zero precalc.z for all parts.
which may cause vehicles to phase through walls and then suddenly collide =/
The text was updated successfully, but these errors were encountered:
add ramp-up
>
and ramp-down<
tiles.make vehicle_part::precalc into a tripoint, with z-level default to 0.
in
displace_vehicle()
, when a vehicle structural tile moves off a ramp, increment or decrement its precalc.z as appropriate. when the pivot point moves off a ramp, increment or decrement it's pos.z and decrement or increment precalc.z.ie:
0. bike with pivot 0, 0 and frames [0,-1], [0,0], [0,1], wheels [0,-1] and [0,1], and unified control system [0,0].
0a. vehicle global pos is [23,24,0] with the wheel at [0,-1] on a
>
.open questions:
what to do about vehicles that are wider than ramps?
center of a vehicle goes up a 2-wide ramp, including the pivot point but none of the wheels.
center of a vehicle down down a 2-wide ramp, including the pivot point but none of the wheels.
sensible solution:
a vehicle can only be split between z-levels while some part of the vehicle is on a ramp. when no part of the vehicle is on a ramp, relocate the vehicle's global_pos3.z to the average of the wheel's pos3.z and then zero precalc.z for all parts.
which may cause vehicles to phase through walls and then suddenly collide =/
The text was updated successfully, but these errors were encountered: