I was trying to keep objects within a room using the clamp function but it wasn't working and I couldn't figure out what I was doing wrong. Now I know it was because I wasn't assigning the result to x and y and it now works in my game! Thanks for the helpful info 👍
Well done, clear and concise, an excellent tutorial, thank you.
I was trying to keep objects within a room using the clamp function but it wasn't working and I couldn't figure out what I was doing wrong. Now I know it was because I wasn't assigning the result to x and y and it now works in my game! Thanks for the helpful info 👍
does clamp wrap? say I dont ever want it to go between -.2 and .2 but ANYTHING with absolute value between .2 and 1 is ok.
Hmm... I'm having trouble understanding what you mean exactly, sorry!
Wouldn't you set the .2 as the minimum and the 1 as the maximum? Then it can never leave that range.