Flowing lava issues


#1

I’ve made a script that’s supposed to make lava flow, but I’m not sure how to add it to the material.
Here’s the script.

var Lavaflow = pc.createScript('lavaflow');

// initialize code called once per entity
Lavaflow.prototype.initialize = function() {
    
};

// update code called every frame
Lavaflow.prototype.update = function(dt) {
    
};

#2

Sounds like you want to start by using animated textures as shown here: https://developer.playcanvas.com/en/tutorials/animated-textures/


#3

I did. This is that script.


#4

The script that you have posted in the first post has no logic in it. Both the initialize and update functions are empty.


#5

Must have accidentally deleted the original script. My bad.