Project Settings - theRAPTLab/gsgo GitHub Wiki
Boundaries are now defined in the project settings.
You can set left, right, top, and bottom edges independently. The stage will be centered on the screen. e.g.
bounds: {
top: -400,
right: 400,
bottom: 100,
left: -300,
},
We've added a gray outline to indicate the borders. If bounds are not set in the project file, the system will default to -400, 400, 400, -400.
See !77, !191
You can also set the how each wall will wrap. Set to true
to wrap. The settings follow CSS conventions:
-
wrap: true
-- Wrap all four walls. -
wrap: [false, true]
-- Specifies top/bottom, and left/right, respectively. So in this example, agents will bounce off the top and bottom, but wrap left and right. -
wrap: [false, true, false, false]
-- Specifies top, right, bottom, left, respectively. In this example, only the right wall will wrap, every other wall will bounce. - undefined -- If
wrap
is not defined, the all walls will bounce by default.
wrap
goes into the bounds
object, e.g.:
bounds: {
top: -400,
right: 400,
bottom: 100,
left: -300,
wrap: [false, true]
},
When using the Project Settings editor, the wrap text is converted to a string.
"true" => true
"True" => true (lowercased)
"TRuE" => true (lowercased)
"true,true" => true,true
"true, true" => true,true (whitespace trimmed)
"false" => false
"t" => false (anything that is not 'true' is false)
"f" => false
The normal wander behavior has agents continuing in the same direction with a 2% chance of changing direction. This means that with wrap off, agents will tend continue to try to go towards walls, resulting in many agents stuck to the walls.
The bounce
flag will make the agents change direction if they hit a wall.
bounds: {
...,
wrap: [false, false]
bounce: true
}
By default (if "default character" project setting is not set), new inputs (from Pozyx, PTrack, or FakeTrack) entities will try to create a new character type in this order:
- select a random pozyx-controllable character (has
# TAG isPozyxControllable true
), or - select the first non-global character type as the starting character type, regardless of whether it is pozyx-controllable. This way a character is always selected even though the "CHARACTER CONTROLLERS" display will show a blank character type.
You can override that by setting the "default character" in Project Settings. Any new entity will use the default character type.
This does not apply to CharControl inputs, since they explicitly define a character type.