Code: Select all
for i=1, len do
if cols[i].normal.y == -1 then
self.onGround = true
end
Code: Select all
for i=1, len do
if cols[i].normal.y == -1 then
self.onGround = true
end
Try checking if the normal is 1 instead or 0, one of those should work, I think.Crono wrote:..
If I do that the variable never gets true.Davidobot wrote:Try checking if the normal is 1 instead or 0, one of those should work, I think.Crono wrote:..
Is the variable ever true when you check for -1?Crono wrote: If I do that the variable never gets true.
I had the code for this and I remember that the value was -1, but I deleted it because I'm and idiot. I'm already using the 1 pixel for now.Davidobot wrote:Is the variable ever true when you check for -1?Crono wrote: If I do that the variable never gets true.
If anything you can just check if there is a block 1 px under the player.
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 2 guests