mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-24 10:07:17 +01:00
Implemented handling the new collider_z_offset property for merged TiledWalls.
This commit is contained in:
parent
0227b18d06
commit
40d9d6b49b
@ -607,6 +607,9 @@ void PropInstanceMerger::_prop_preprocess(Transform transform, const Ref<PropDat
|
||||
Ref<PropDataTiledWall> tiled_wall_data = e;
|
||||
|
||||
if (tiled_wall_data.is_valid()) {
|
||||
Ref<TiledWallData> twd = tiled_wall_data->get_data();
|
||||
|
||||
if (twd.is_valid()) {
|
||||
_job->add_tiled_wall(tiled_wall_data, t);
|
||||
|
||||
if (tiled_wall_data->get_collision()) {
|
||||
@ -618,12 +621,14 @@ void PropInstanceMerger::_prop_preprocess(Transform transform, const Ref<PropDat
|
||||
|
||||
tws->set_extents(Vector3(hew, heh, 0.01));
|
||||
|
||||
Transform tt = t;
|
||||
Transform et = e->get_transform() * Transform(Basis(), Vector3(0, 0, twd->get_colldier_z_offset()));
|
||||
Transform tt = transform * et;
|
||||
//tt.origin += Vector3(hew, heh, 0);
|
||||
tt.translate(hew, heh, 0);
|
||||
|
||||
_job->add_collision_shape(tws, tt, true);
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user