Setting Up HFFWS Project

August 9, 2019

HFFWS

Setting Up Initial Project

Youtube - Human Fall Flat - How to make a map - Ranul
By: Ranul

So following this tutorial, the bare minimum for getting a level started is simply adding the "Level" prefab into your scene. This comes with:

  • InitialSpawnPoint: where the player spawns in; even has an indicator with a ray to show exactly where they will hit
  • FallTrigger: this is the trigger that determines when the player should be respawned
  • PassTrigger: the trigger for finishing the level (the goal)
  • Directional Light: standard directional light
It also sounds like "everything" needs to be childed to this Level prefab, so I'll stick with that until I find otherwise.

Thrower Tutorial

Youtube - Spinning Thrower + Space Unity Tutorial for Human Fall Flat Workshop
By: Gotcha McFee

This tutorial shows how to use some basic tools that Probuilder affords you in Unity to make a moving, interactable object in your HFF level. This specific object is a "Thrower", which is a spinning wheel that the player can hold onto then release to get launched to a new area from the wheel's momentum.

Notes that the mass of objects makes a big difference in HFF in general, so modifying this can help if you aren't getting the desired results. Generally objects start with a rigid body mass of 1, but in this example they set the wheel to a mass of 500. This significant difference shows you should be careful keeping track of your object masses so you don't get issues just because you missed a very low mass value.

There are some notes on how to make a Probuilder object into a moving and interactable object in HFF. To allow it to move, there is an Entity Type under the Pb_Entity component that must be changed to "Mover". To allow it to then be interactable, the Mesh Collider component needs to have the Convex option turned On. I noticed you could still interact with the thrower holders (just long cubes on the sides of the wheel) without changing anything, so it seems the Convex option is only important for moving objects.

Noted important factors for a wheel object:

  • (If Probuilder object) Pb_Entity - Entity Type - Mover
  • (If Probuilder object) Mesh Collider - Convex (On)
  • Hinge Joint component (automatically adds Rigidbody component)
  • Hinge Joint - Axis (Ex. 0, 1, 0)
  • Hinge Joint - Use Motor (On)
  • Hinge Joint - Motor - Target Velocity (Ex. 175)
  • Hinge Joint - Motor - Force (Ex. 500,000)
  • Rigidbody - Mass (Ex. 500)

Rope Tutorial

Youtube - Rope tutorial in Unity for Human Fall Flat
By: Gotcha McFee

This shows how to create a simple rope in the HFFWS from scratch.

The main objects needed as children objects of your overall rope object are:

  • Start
  • End
  • Rope
The Start and End are just Rigidbody objects with certain masses and constraints (want the start to be more solid and fixed where the end is more manueverable and flexible). The Rope holds a lot of the inner workings of the rope object.

Components needed for the Rope object within the overall rope hierarchy:

  • Rope (Script)
  • Mesh Filter
  • Mesh Renderer
  • Net Body (Script)(which has Net Identity attached as required component)

ISSUES

The tutorial shows how to add some objects like spheres and cubes to the rope object to give it an attachment point at the top and interactable objects at the end. I just wanted to quickly test adding the objects to hold onto on the end of the rope, so I just added a sphere as a child of the end and tried running the game. This caused the rope to glitch out and jump around violently. It appears that adding an object that has too much "rope in it" causes some weird collisions that just make everything move around erractically. I was able to get similar results to the tutorial by moving the sphere a bit below the end transform (without completely removing it visually from the end of the rope). This is just something to be aware of if adding to your rope.

PARAMETERS

The tutorial goes over some of their experience with the parameters of the rope script and results that have and have not worked for them.

Rigid Segments:
Having too many of these makes the rope too "heavy" and hard to use. You can change the individual segment weights as well, but too low of a segment mass causes the rope to "break" and become very glitchy. They generally make normal ropes have about 6 or 7 segments, with 15 being about the max for a very large rope.

Segment Mass:
The default value for this is 20 and that seems to be a pretty nice standard value. As mentioned previously, very low values break the rope and cause it to function incorrectly. The 15 to 20 range seems to be pretty consistent, but just make sure to test ropes with varying mass values if you are getting strange results.

Comments

Popular posts from this blog

Online Multiplayer Networking Solution Tutorial Using Unity and Mirror - Tutorial by: Jason Weimann

Sebastian Lague A* Tutorial Series - Path Smoothing - Pt. 08 and Pt. 09

Exporting FBX from Houdini with Color