Commit 036515f 1 parent daa2460 commit 036515f Copy full SHA for 036515f
File tree 1 file changed +8
-12
lines changed
src/systems/logical_camera
1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -255,18 +255,14 @@ void LogicalCameraPrivate::UpdateLogicalCameras(
255
255
GZ_PROFILE (" LogicalCameraPrivate::UpdateLogicalCameras" );
256
256
std::map<std::string, math::Pose3d> modelPoses;
257
257
258
- _ecm.Each <components::Model, components::Name, components::Pose>(
259
- [&](const Entity &,
260
- const components::Model *,
261
- const components::Name *_name,
262
- const components::Pose *_pose)->bool
263
- {
264
- // / todo(anyone) We currently assume there are only top level models
265
- // / Update to retrieve world pose when nested models are supported.
266
- modelPoses[_name->Data ()] = _pose->Data ();
267
- return true ;
268
- });
269
-
258
+ _ecm.Each <components::Model, components::Name>(
259
+ [&](const Entity &_entity,
260
+ const components::Model *,
261
+ const components::Name *_name)->bool
262
+ {
263
+ modelPoses[_name->Data ()] = worldPose (_entity, _ecm);
264
+ return true ;
265
+ });
270
266
271
267
_ecm.Each <components::LogicalCamera, components::WorldPose>(
272
268
[&](const Entity &_entity,
You can’t perform that action at this time.
0 commit comments