Jump to content

method setPositionWithLocalVector not found on object


Recommended Posts

I have pulled the latest version from git and tried running an experiment to just get familiar with moving objects in a scene and some need local translation.  Looking at the docs, I saw that the recommended method was to be used:




I'm getting an error that the method is not found on the Mesh object I'm trying to move.  Can someone shed light on:


1.  whats the correct version of Babylon to be using?

2.  am I using the correct method for local translation? 

3.  If not, which should I be using?


Thanks very much,



Link to comment
Share on other sites

Hi John,


1. Currently, it's 1.8.0. The latest version (let's say "production version") is always the one at the root of the repository. As you noticed this file may not be the latest minified version. You can consider it like the .exe of an application and the others files as the files to build to get the .exe. Thus, if one of these files is modified, the .exe is not up-to-date. If you want the updated version you have to build the files. For the minified version of BabylonJS you have two options described here https://github.com/BabylonJS/Babylon.js/wiki/Creating-the-minified-version. You can also read this: https://github.com/BabylonJS/Babylon.js/tree/master/Tools/BuildOurOwnBabylonJS (that's for the second option)


2. This discussion may help you to make your choice: http://www.html5gamedevs.com/topic/2754-infinitedistance/. You can read the whole discussion (which contains links to jsfiddle examples) or directly click on the link that I picked as the best solution.


3. It depends on what you are trying to achieve. Use setPositionWithLocalVector(BABYLON.Vector3) or locallyTranslate(BABYLON.Vector3)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...