I was able to successfully get a single Mesh to lookAt()
a Vector3
object, but when I try to do this with a Group
of Meshes things go kinda crazy!
Here’s what I mean:
When I create a single Cone Mesh (for example) and then use lookAt()
to have the Cone rotate in place to follow say my Mouse’s movements, everything works great.
But if I create this Cone Mesh
, then create a Box Mesh
, and then add both of those Meshes to a new THREE.Group()
- and then apply lookAt()
to that Group, something very weird happens. Instead of the Group rotating in place to follow my Mouse’s movements (meaning have both the Cone and the Box following my Mouse movements,) the Group’s entire location - meaning it’s X, Y, and Z coordinates, all change continuously so that the Cone and the Box float all over the screen every time I move my Mouse.
So instead of them staying in place and simply rotating to follow my mouse, they’re flying all over the place.
So what am I doing wrong?
OR: is it simply not possible to use lookAt()
with a THREE.Group()?