Skip to content

Retrieves the world position of a vector or Entity in PlayCanvas

Notifications You must be signed in to change notification settings

whydoidoit/position

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

A function that returns the position of an entity if passed one, otherwise a Vec3 world coordinate in PlayCanvas.

Installation

npm install --save playcanvas-get-position

Usage

import getPosition from 'playcanvas-get-position'

...

MyPlayer.prototype.goto = function(entityOrPosition) {
    this.targetPoint.copy(getPosition(entityOrPosition));
} 
 

Requirements

Requires PlayCanvas Engine to be running on the page. Uses ES6/Babel/PlayCanvas template.

About

Retrieves the world position of a vector or Entity in PlayCanvas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages