Rotation using AddEntity not working


I am attempting to rotate a model using AddEntity().

I’ve tried both ‘rotation’ and’ localRotation’ and they both flip the Y 180 degrees based on my code below. I want to rotate the object only 90 degrees.

Also, they both make the object super big, then eventually render it properly. Sometimes I have to shutdown and restart the Interface to see the object in place.

var Rotation = { x: 0, y: -90, z: 0, w: 0 };

        var properties = {  
            type: "Model",
            modelURL: house,
            position: newCoord,
            rotation: Rotation,
            //localRotation: localRotation,
            dimensions: { x: 1, y: 1, z: 1 },
            collisionsWillMove: true,
            shapeType: 'static-mesh'
        entityID = Entities.addEntity(properties);


A rotation is a Quat (quaternion) with all x, y, x, w, values being between 0.0 and 1.0.

What you want is…

var Rotation = Quat.fromPitchYawRollDegrees(0, -90, 0);

And for interest…

// {"x":0,"y":-0.7071067690849304,"z":0,"w":0.7071067690849304}


Thank you! Makes sense now :))


Quarternions make sense??? Bless you.