<commit_before>---
title: Moving Entities
tags:
 - tutorial
 - beginner
 - entities
level: beginner
index: 1
---

# Moving Entities

Entities form the basis of most applications built using the PlayCanvas framework. An Entity can represent anything from the player character, a bullet, an enemy or just simply be point in space.

Entities are a special form of graph node, they inherit a lot of their behaviour from `pc.scene.GraphNode`. All the manipulations we apply below can also be applied to graph nodes

One of the most common operations you will need.to perform on entities is to manipulate its transform matrix. The local transform property of the entity determines the position, orientation and scale of the entity and affects all child entities as well. Learning how to manipulate the transform is critical to making interesting and interactive applications.

### Local and World Co-ordinates

An important part of understanding how to move and manipulate Entities is understanding Local and World co-ordinate systems. The World co-ordinate systems is shared by all Entities, it has a fixed origin `(0,0,0)` and a fixed orientation - where `(0,1,0)` is up. The local co-ordinate system relative to the Entity itself. So the local origin is the Entity position, and the orientation follows the orientation of the Entity.

<img src="/media/images/tutorials/world.jpg" style="float:left;" alt="World co-ordinates"/>
<img src="/media/images/tutorials/local.jpg" style="float:right;" alt="Local co-ordinates"/>
<div style="clear:both" />
*World and Local co-ordinate systems*
<br />

Each entity has a local transformation matrix and a world transformation matrix. The world transform is calculated by combining the local transforms of all parents of the Entity in the hierarchy (see Hierarchy section below). Usually you will be modifying the local transform.

~~~js~~~<commit_msg>Some spelling fixes and changes<commit_after>---
title: Manipulating Entities
tags:
 - tutorial
 - beginner
 - entities
level: beginner
index: 1
---

# Manipulating Entities

In this tutorial we'll show you how you can change an Entity's position, orientation and scale. 

Entities form the basis of most applications built using the PlayCanvas framework. An Entity can represent anything from the player character, a bullet, an enemy or just simply be point in space.

Entities are a special form of graph node, they inherit a lot of their behaviour from `pc.scene.GraphNode`. All the manipulations we apply below can also be applied to graph nodes

One of the most common operations you will need to perform on Entities is to change its transform matrix. The local transform property of the Entity determines the position, orientation and scale of the Entity and affects all child Entities as well. Learning how to manipulate the transform is critical to making interesting and interactive applications.

### Local and World Co-ordinates

An important part of understanding how to move and manipulate Entities is understanding local and world co-ordinate systems. The world co-ordinate systems is shared by all Entities, it has a fixed origin `(0,0,0)` and a fixed orientation - where `(0,1,0)` is up. The local co-ordinate system relative to the Entity itself. So the local origin is the Entity position, and the orientation follows the orientation of the Entity.

<img src="/media/images/tutorials/world.jpg" style="float:left;" alt="World co-ordinates"/>
<img src="/media/images/tutorials/local.jpg" style="float:right;" alt="Local co-ordinates"/>
<div style="clear:both" />
*World and Local co-ordinate systems*
<br />

Each entity has a local transformation matrix and a world transformation matrix. The world transform is calculated by combining the local transforms of all parents of the Entity in the hierarchy (see Hierarchy section below). Usually you will be modifying the local transform.

~~~js~~~
{'fraction_non_alphanumeric': 0.06333333333333334, 'fraction_numerical': 0.0035897435897435897, 'mean_word_length': 4.686588921282799, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2263523', 'n_tokens_mistral': 948, 'n_tokens_neox': 911, 'n_words': 548}