Blockland Forums > Modification Help
Player Snaps to Brick Grid
xS K I D z:
I've been looking around to see if I can figure out a way to align a player (and/or player's playertype) to the brick grid and so far have not made a whole lot of progress. I found some useful information in the Fluidity Playertype I believe but it uses gibberish that I've not dealt with before and it looks like it uses a brick collision box or something but I'm not sure if that is solely used to find edges or "ledges"... I guess I'm looking for a bit more explanation on the subject. What I'm looking for is to snap the player to the grid after a key is pressed, then un-snap after you start moving. Any help is appreciated.
PhantOS:
You'd want to run a loop that gets their position and rounds it out to every whole number. Then you take the rounded position and settransform them to it. To trigger it you'd probably wanna use on trigger's right click
Conan:
--- Quote from: PhantOS on February 09, 2018, 04:20:41 PM ---You'd want to run a loop that gets their position and rounds it out to every whole number. Then you take the rounded position and settransform them to it. To trigger it you'd probably wanna use on trigger's right click
--- End quote ---
not whole number, 0.5. 1 stud is 0.5 TU long.
note that if you do every 0.5 units starting from 0 0 0, you'll be on the edge of every stud. you should offset it by 0.25 on the x and y plane if you want to be in the middle of the stud.
also, note that 1 plate is 0.2 TU high.
PhantOS:
Cmonm 0.5 and 1are basically the same number
Conan:
--- Quote from: PhantOS on February 09, 2018, 04:52:33 PM ---Cmonm 0.5 and 1are basically the same number
--- End quote ---
i'll loving divide you by two smh