Expression/dynamic 3D object face

I see it is not possible to use an expression when changing a 3D object’s face in an event.
Is there any possible workaround for this?

I’m assuming that this is not possible. I guess I will try the ThreeJS 3D extension instead.

What exactly do you need an expression for?

So I can set the face on the 3D box using a variable.

You could have an event that checks the value of the variable in question and then runs the change face action when the condition is met. It requires setting up more conditions and actions, but the result should be the same.

So youd be able to name the object variable to one of the games resources then it use it on the object?

I think you should put this on feature requests.

I appreciate the suggestion, but that’s what I was trying to avoid. If I have 500 image possibilities, I would have to set 500 conditions, it could be 1 action if I could just set the face to a variable.

2 Likes

You can create a extension and add a javascript action if you are familiar.

const objects = eventsFunctionContext.getObjects("Object");
const face = eventsFunctionContext.getArgument("FaceName");
const resource = eventsFunctionContext.getArgument("ResourceName");
objects[0].setFaceResourceName(face,resource);
2 Likes