0
votes

I want to make a child object to look at the camera position.

In my code, the a-text object is child object of a-entity that is a sphere.

I set the lookat for a-text object to camera position. but it works wrong behavior.

I found the reason but no idea for how to solve it.

According to three.js explains (https://threejs.org/docs/#api/en/core/Object3D.lookAt)

This method does not support objects having non-uniformly-scaled parent(s).

But I don't have any idea what is uniformly-scaled parent...

1

1 Answers

0
votes

I think it means that if you look at the parents of the object they all have the same scale. Just to be clear, the two entities below would not work right

<a-entity scale="1 2 1">
    <a-entity scale="2 2 2">
    </a-entity>
</a-entity>

https://aframe.io/docs/1.0.0/components/scale.html#sidebar