#help with math.noise
65 messages · Page 1 of 1 (latest)
IM NOT ON THAT LEVEL YET
im sorry bro
u dont have to help me
but
ion know that stuff yet
but
yea no
ðŸ˜
Hm
u work on mine i work on yours
idk how to do noise
but i can try
to help at lwast
its not printing nun for me
i called the function
oh nvm
idk how return work either
yea
did that
it works
mb
i been coding too long to not learn wat return mean
i been searching that up for a while
anyways
I’m currently experimenting with procedural terrain generation and encountered an issue. I’m trying to generate a heightmap using math.noise, but for some reason every value it outputs is 0. Here’s the code snippet in question (ignore the weird function at start and some other stuff that might grind your gears, it’s only there for debugging): ...
actually i think its something with tick
because once i fill in a number for tick
it works
but
maybe tick aint tickin
Tick is prob too big
!
its working
it did that not me
what
--//Variables//
local Run = game:GetService("RunService")
local char = script.Parent
local camera = workspace.CurrentCamera
local amp = .5
local freq = .2
--//Functions//
local function GetRotation()
local x = 0
local y = 0
local z = math.noise(tick()/10000*freq,0,0)*amp
return Vector3.new(x,y,z)
end
local function SetCameraRotation(Rotation:Vector3)
local CF = camera.CFrame
local x,y,z = math.rad(Rotation.X),math.rad(Rotation.Y),math.rad(Rotation.Z)
camera.CFrame *= CFrame.Angles(x,y,z)
return camera.CFrame
end
--//Events//
Run.RenderStepped:Connect(function()
SetCameraRotation(GetRotation())
print(GetRotation())
end)