-
Notifications
You must be signed in to change notification settings - Fork 53
Danmaku Field
A Danmaku Field defines an area where Danmaku can be spawned, or in general, where a danmaku game exists.
Virtually everything that exists in DanmakU is dependent on a Danmaku Field.
You can have multiple Danmaku Fields in one scene.
DanmakuField is a sealed class and cannot be inherited from.
A Field can be "bound" to a Camera. When bound, the Field's bounds move with the camera: the movement bounds are exactly the same size as the frustrum of the camera. This camera must be set to orthographic, and the clipping plane is moved accordingly.
When placing a Danmaku Field in the world you will see two gizmo boxes on the Z=0 plane:
The yellow one shows the Danmaku clipping plane. All danmaku fired/bound to this Field will be automatically deleted upon moving out of these bounds.
The blue one shows the movement bounds. Any Danmaku Player Character are automatically bound to this area, and cannot be moved outside of it.
The inspector looks like this:
Property | Description |
---|---|
Use Clipping Plane | If set to false, the field will not use a clipping plane, and all bullets fired from within said Field are unbound and can navigate indefinitely. |
Clip Boundary | The scale for clip boundary. Set this higher if you need more space outside of the movement bounds for bullets to fly about. |
2D Camera | The Field's camera |
Field Size | (Only shown when 2D Camera is None) The size of the field in absolute world coordinates. |
Other Cameras | Other cameras that share the same viewport rect as the 2D camera. |