Skip to content
Branch: master
Find file History
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples/basic [look-at] update examples 0.9.0 Feb 15, 2019 npm run readme to update readmes with versions Feb 18, 2019
index.html update title and links Dec 1, 2018
index.js [look-at] fix Feb 15, 2019


A component for A-Frame to tell an entity to face towards another entity or position. Uses three.js's Object3D .lookAt()

The look-at component defines the behavior for an entity to dynamically rotate or face towards another entity or position. The rotation of the entity will be updated on every tick. The look-at component can take either a vec3 position or a query selector to another entity.


Type Description
selector A query selector indicating another entity to track. If the other entity is moving then the look-at component will track the moving entity.
vec3 An XYZ coordinate. The entity will face towards a static position.


Browser Installation

Install and use by directly including the browser files:

  <title>My A-Frame Scene</title>
  <script src=""></script>
  <script src=""></script>

    <a-entity id="monster" geometry="primitive: box" material="src: url(monster.png)"
    <a-entity id="player" camera></a-entity>

    <a-entity id="dog" geometry="primitive: box" material="src: url(dog.png)"
    <a-entity id="squirrel">
      <a-animation id="running" attribute="position" to="100 0 0"></a-animation>

NPM Installation

Install via NPM:

npm install aframe-look-at-component

Then register and use.

You can’t perform that action at this time.