|
|
@@ -32,8 +32,8 @@ function UnitPreview:update(dt)
|
|
|
local pos = Vector3(radius, radius, -radius) * 2
|
|
|
local camera_pos = Matrix4x4.translation(tm) + pos
|
|
|
local target_pos = Matrix4x4.translation(tm)
|
|
|
- SceneGraph.set_local_rotation(self._sg, camera_unit, Quaternion.look(Vector3.normalize(target_pos - camera_pos)))
|
|
|
- SceneGraph.set_local_position(self._sg, camera_unit, camera_pos)
|
|
|
+ SceneGraph.set_local_rotation(self._sg, tr, Quaternion.look(Vector3.normalize(target_pos - camera_pos)))
|
|
|
+ SceneGraph.set_local_position(self._sg, tr, camera_pos)
|
|
|
end
|
|
|
end
|
|
|
|