Allow model position to be set without assoc
This commit is contained in:
@@ -77,11 +77,12 @@
|
|||||||
(draw-entity! [{:keys [^ModelInstance object x y z]}
|
(draw-entity! [{:keys [^ModelInstance object x y z]}
|
||||||
{:keys [^ModelBatch renderer ^Environment attributes]}
|
{:keys [^ModelBatch renderer ^Environment attributes]}
|
||||||
_]
|
_]
|
||||||
(let [^Matrix4 m (. object transform)
|
(when (or x y z)
|
||||||
x (float (or x 0))
|
(let [^Matrix4 m (. object transform)
|
||||||
y (float (or y 0))
|
x (float (or x 0))
|
||||||
z (float (or z 0))]
|
y (float (or y 0))
|
||||||
(.setTranslation m x y z))
|
z (float (or z 0))]
|
||||||
|
(.setTranslation m x y z)))
|
||||||
(.render renderer object attributes)))
|
(.render renderer object attributes)))
|
||||||
|
|
||||||
(defrecord ShapeEntity [object] Entity
|
(defrecord ShapeEntity [object] Entity
|
||||||
|
|||||||
Reference in New Issue
Block a user