Quantcast
Channel: Babylon.js
Viewing all articles
Browse latest Browse all 388

Behavior of objects different in playground

$
0
0

When I run this code locally, it's fine, the generated spheres "stay put". On the playground, the generated spheres move with the target (which is the parent of the camera).

 

http://www.babylonjs-playground.com/#RZ2XP#4

 

Press "C" to generate spheres. Use arrow keys to change movement direction.

 

If I were to guess, this is a difference in what happens with this code:

 

var local_position = new BABYLON.Vector3(0, 0, 0)

local_position.z += 40
        
// Local to World Transformation 
var to_world_transform = target.getWorldMatrix()
 
var place_at = BABYLON.Vector3.TransformCoordinates(local_position, to_world_transform);
 

 

(As a side note, how does one get the BABYLON version string?)

 


Viewing all articles
Browse latest Browse all 388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>