Export from blender rotates the skybox when apply rotation

Recommended Posts


I'm a newbee at babylonjs and I'm currently learning the BJS engine as well as the blender for 3d modelling. I have a problem when I import a .babylon file that I have created in blender. What I want to do is after loading the model, to set an ArcRotate camera to the model. I'm using this propery in order to set the target:

var assetsManager = new BABYLON.AssetsManager(scene);
var boatMeshTask = assetsManager.addMeshTask("BoatTask", "Boat", "assets/Boat/", "tugboat.babylon");
    boatMeshTask.onSuccess = function (task) {
       model = task.loadedMeshes[0];
       model.position.z = -80;
       model.position.y = 3; = model;
       camera.lockedTarget = model;



The problem is that when I try to apply a rotation to the model at Z axis, my skybox rotates as well. I'm using BABYLON.Space.LOCAL. For translation I'm using the following code:

model.rotate(BABYLON.Axis.Z, rotationAngle, BABYLON.Space.LOCAL);

This is the model I try to load:

Any suggestion;

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.