March 25th, 2018
Update on Gear Mesh Generating Toy
Link to Web Build of Prototype Currently
Current Controls
- Left Mouse Button – Press: Select a gear to make it active
- Let Mouse Button – Drag: Move selected gear around
- Left Mouse Button – Drag + Spacebar: Destroy selected gear
- w : makes the gear spawning object the active object (instead of any gears)
- Typing in input fields: Changing the number in this input field will alter the corresponding parameter of the currently active (selected) object.
Selecting a gear and changing the value in the input field will immediately change that corresponding parameter on that gear. For example, if you left click a gear, then type the value “1” into the “Body Radius” input field, that gear will have its body radius value immediately change to 1, and its mesh and colliders will update along with it.
There is an invisible gear spawning object (“gear spawner”) that creates a gear when the “Create Gear” button is pressed. The gear created will have values based on whatever the spawner’s current values are. To change the spawner’s values, the spawner must be the active object. This is where the “w” key control comes in. Once the player presses “w”, as long as they don’t left click another gear in the mean time, changes to the input field will become the values of the spawner. Then the next time the “Create Gear” button is pressed, it will use those updated spawner values to create the new gear. This gear can then be altered as any other gear.
Current Issues to Avoid
The input fields do not show the values of an object when it is selected. This can be a bit confusing since it makes it hard to tell what the currently selected object’s values are, unless the player just remembers them. This is something that would be crucial to update as there is currently no way to actually see the current values.
The spawner does initialize at all values of “0”. Just be aware that if you try to create gears before changing the spawner’s parameters, you will be creating invisible empty objects.
When attempting to update the spawner, make sure to press “w” before changing any values in the input fields. This was something I found myself messing up a lot, and would be a feature to improve in the future. Again, make sure to press “w”, and not click any other gears, before changing the input fields to update the spawner’s values.