BG`Database BG`Localization BG`Curve Blog Support
  • BG Database
  • BG Localization
  • BG Curve
  • Support
  • BG Curve Home
    • Features
    • Videos
    • Screenshots
  • BG Spline Colliders
  • User Guide
    • Manipulating Points
    • Spline Properties
    • Spline Settings
  • Developer Guide
    • Coordinates
    • Math
    • Examples
    • Overview
  • API Reference
    • Curve
    • Point
    • Math
    • Section
  • Components
    • Math
    • Collider 3D Box
    • Collider Capsule
    • Collider 3D Mesh
    • Collider 2D Box
    • Collider 2D Edge
    • Collider 2D Mesh
    • TRS
    • Line Renderer
    • Triangulate 2D
    • Polyline Splitter
    • Sweep 2D
    • Cursor
    • Move by cursor
    • Rotate by cursor
    • Scale by cursor
    • Lerp cursor
  • Versions
BG Curve Home User Guide For Programmers Components Versions
Unity provides standard spline asset, use BGCurve only if Unity spline misses some feature

Curve Components

General information

Using Components, you can add some functionality to the spline without any scripting. Components are standard MonoBehaviour subclasses. Also, use component's code as an example to develop your own custom components.

Math

Math component gives you access to math functions. Currently 4 functions are supported
1) get spline's length
2) get position
3) get tangent and
4) get position and distance of a point on the spline, which is closest to a given point

Collider 3D Box

Create a set of Box Colliders along 3D spline.

Collider 2D Box

Create a set of 2D Box Colliders along 2D spline.

Collider 2D Edge

Fill points of 2D Edge Collider along 2D spline.

TRS

Move/Rotate/Scale some object with single component.

Line Renderer

Visualize the spline with LineRenderer Unity's component in Play mode.

Triangulate 2D

Triangulate 2D spline (simple polygons only).

Polyline Splitter

Split spline to polyline.

Sweep2D

Sweep a line or 2D spline (profile) along another 2D spline.

Cursor

Identify the distance along the spline.

Move by Cursor

Moves an object to the cursor position every frame

Rotate by Cursor

Rotates an object according to the spline's tangent or custom field value at the position, defined by a cursor

Scale by Cursor

Scales the object, based on custom field value, defined by a cursor position

Lerp Cursor

Change cursor position linearly every frame

or