I am trying to re-create the fortnite build system within Unity, and then maybe post it on the Unity asset store. I will use this system myself in the project I am making just to learn more about Vectors and networking. Thus the project is called Vector!
I’d love to get your feedback, is the system able to predict correctly were you want your next wall/ramp/floor?
I am still working on a better mechanic when you look down to directly build in front of you rather than away from you. Eventhough this is a known issue I’d still like to hear your feedback on how you would like to see it. I am also very curcious about your creations, so please do share some screenshots!
For the fortniteplayers: Does it feel close to fortnite?
Not able to use the web version properly. The mouse doesn’t allow me move around properly, and once I’ve locked the cursor, I can’t find a way to unlock it.
Fixed an issue were if you looked back, the object would be placed too far ahead.
Placed the camera closer to the player so look down will trigger faster (still working to improve this)
I’ve also updated the instructions thanks to ImFromTheFuture!
I’d still ike everyones feedback on the (new) system! My next things to improve: Better placement for the floor. And a system to check wheter it’s possible to build the buildable. Will probably take some time tho :).
It’s just a giant 4m grid, all asset are align to the grid, so the grid only store few information (the ID, the sub division like windows and door, the orientation), you just raycast in case there is an occlusion (terrain or other), else you can spawn something in that cell.
From gameplay perspective it solve all alignement, and the prediction is just the spatial hash relative to where the character is. It makes doing the building fast and snappy, no fiddling with position.
I’m not fully able to understand what you’re trying to say :).
It’s a 3m grid and based on player position and rotation the ray is longer or shorter, making it easier to build up. Based on player rotation you can guess the rotation of the object to be placed.
Really loved it. Controls are really perfect. I’m a Fortnite player, I played about 900-1000 matches. My build keys are Q,F,C. But I change they, when I try this. Q,Z,F is really good combination. Thank you.
Sounds reasonable, spatial hash is a good idea just use dictionarys instead hashtables
the only thing left is a tons of conditional statements for buildings wich fit together or nor
Ah, I see what you mean. I haven’t had a good thought on that yet. Thanks for poiting that out, I’ll definately have a look on the approach somewhere this week. The idea is most likely quite simple: have an array which holds an array of 3 (which could represent all 3 building types).
Ya their specific approach is one I picked up on and borrowed because it’s actually quite ingenious. They have just one object of the same dimension that they place. And they use set offsets so everything always aligns perfectly using very simple math.
Which also means you don’t even need runtime raycasting to place stuff. You can pre scan the map and raycast at the offsets. Then at runtime use a simple mouse pointer ray intersection test against grid cells.
Yeah so as of now. I basically caluclate the build position by taking the players position and add a distance to it. Then get the nearest number to the grid (there is no actual grid / array as of now).
There are some if statements to figure out were’s the best place to put but most of these could be removed after a system like everyone is mentioning is implemented.
I’ve created the offset in the .FBX file already so I don’t have to mess around with that.
Thanks everyone for pointing that out. It’s the next todo thing on my list
…next, how would you solve the building on each other ? With just raycasting it wouldn’t work, right?because buildings relay on orientation more on just ifNeighbour is inUse, right?
Thats my approach…
Already reworked it, to ge more control over placement and stuff like this…
But yeah didn’t touched this for a week…