I've been struggling with this for the past month and I can't figure out what I'm doing wrong. All I'm do is trying to add a Light to a Node, to make it overall brighter. Do I have to move the attached Light? Someone please help me.
ModelRenderable.builder()
.setSource(
this,
Uri.parse("squarecard.sfb")
)
.build()
.thenAccept(
modelRenderable -> {
Light spotLightYellow =
Light.builder(Light.Type.FOCUSED_SPOTLIGHT)
.setColor(new Color(android.graphics.Color.YELLOW))
.setShadowCastingEnabled(true)
.build();
node.setParent(scene);
node.setLocalPosition(positionOfNode);
node.setLocalScale(new Vector3(1.4f, 1.4f, 1.4f));
node.setRenderable(modelRenderable);
node.setLight(spotLightYellow);
})
.exceptionally(
throwable -> {
Toast toast =
Toast.makeText(this, "Unable to load Fox renderable" + throwable, Toast.LENGTH_LONG);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
return null;
});
I don't see any difference when I attach the light, to my rendered model node. I don't understand what I'm doing wrong.