Hi,
I have the following code that randomize a value between 1.8 - 2.8. I would like to set the size of my sprite to the randomized value. However, when I print the value it is either 1 or 2.
function init(self)
math.randomseed(socket.gettime()) math.random()math.random()
local size_random = math.random(1.8, 2.8)
self.resize_asteroid = vmath.vector3(size_random, size_random, 0)
go.set("#asteroid", "scale", self.resize_asteroid)
end
What is wrong here?