Home Forums Development discussions Future development Reply To: Future development


What’s wrong with writing this function in your Lua script?

function replaceObject(object, newMesh)
    newObject = loadMesh(newMesh)
    setPosition(newObject, getPosition(object))
    setRotation(newObject, getRotation(object))
    setScale(newObject, getScale(object))

    return newObject

Then you could also set an animation as you suggested.

I think this function should reside in your personal code and not in the C++ core engine since it’s only using already available functionality. You can of course package your script as library and distribute it for others to use. That is the preferred way of getting this function to the public.