BPropulsionSystem Documentation

We have built a series of "thrusters", Transform or Physics components that changes game objects position or rotation, can be used as thrusters, engines, controllers, hammers, wind etc.

logo

BPropulsionSystem is composed of a series of Unity3D components designed for MVPs or prototypes that involve moving parts (game objects, characters, enemies, cars, leaves, magnets and so on).

It is a "system" because we have pre-built helper components that will speed your development time, like: throttle controllers with keyboard or joysticks, special effects (particles, lights and sounds) and more.

Examples of usage

  • continuous force applied: car, spaceship, boat, submarine, wind, character jump etc.
  • one time push/nudge: canon ball, pinball etc.
  • simple hover mechanic
  • simple attract/repel forces (based on colliders, ex magnet/gravity)
  • moving a GO on a path of nodes (points)

Friendly

The components shared the following traits:

  • tooltips for all the public properties
  • open code - the code is in C#, open to read and extend (not hidden in a library)
  • all the classes are well documented
  • designed to be extended - the logic is split to multiple functions so you can extend our classes and implement your own custom components, optimized for your specific needs.
  • over 20 DEMO scenes that show and explain in detail how they work
  • Platform independent - it uses only basic UnityEngine features, should be compatible with all platforms (Android, iOS, tvOS, WebGL, Xbox etc.)

Ease of use:

  • The regular thrusters' direction is the same as the Green GO Axis for convenience
  • Custom inspectors for all thrusters
  • Helpers and drawings visible in Scene for debugging purposes

Plug&Play

  • over 20 DEMO examples and prefabs that can be used right away
  • drag&drop components with default values that suit most cases
  • easy setup thanks to visual friendly components, tooltips and comments
  • each thruster pushes/moves an object in one direction, add a thruster for each desired direction

Thrusters

Most of the thrusters share a series of Common properties/features (BThrusterBase):

  • state - ignition on/off
  • faults - temporary disables the thruster, can be used as penalties or debuffs
  • throttle - an absolute value clamped between a min&max
  • normalized throttle - as value between 0-1 and 0-100, to be used as relative/percentage control
  • custom multi component inspector
  • speed or force to push/pull

Physics thrusters (requires a rigid body)

Force - add a Force to a rigid body for each frame (or physics tick), used for simple physics.

Force Point - add a Force and Torque to a rigid body, used for realistic physics, it's position and rotation directly affects the force.

Applied Collider - add a Force to another Rigidbody, push/pull (attract or repel), used for simple magnet/gravity.

No physics thrusters (requires a Transform)

Transform Move - increase a Transform position.

Transform Rotate - increase a Transform rotation based on it's rotation.

Path Actor - moves a Transform position along a predefined linear path made by multiple nodes.

Helpers

Helpers are optional components that are used to affect, interact, display the thruster effects or connect them to other components (made by other devs or Unity).

Most of them work with all types of thrusters, and they were built for demo purposes, as an example of how simple but powerful the Trusters can be.

Together with the Thrusters and Editor components form the BPropulsionSystem.

Controllers (1 or more attached thrusters)

Key - binds a Keyboard/Controller key event to actions: Ignition (on, off, toggle), throttle (accelerate, decelerate, to minimum, to maximum).

Axis - used for joysticks, each Axis can affect 2 series of thruster (one for each side of the axis)

Hover - automatically accelerate/deccelerate based on collider's raycast collisions. Multiple sensors can be created to scan for collisions.

Relay - expose all thruster properties so they can be controlled by custom scripts or animations (Animation, DoTween, iTween etc.)

Continuous - accelerate to maximum and/or minimum throttle for predefined periods of time, or leave it in "endless" mode

Others

UI slider - link a thruster to an UI Slider component both ways

Light - link a thruster to 1 or multiple Light component. Based on throttle it can automatically control the Intensity, Range and/or Color (gradient).

Particles - link a thruster to 1 or multiple ParticleSystem components. Based on throttle it can control the StartLifeTime, StartSpeed and/or Emission RateOverTime.

Sound - link a thruster to 1 or multiple AudioSource components. Based on throttle it can control the Volume and/or Pitch.

Fault collision - apply a fault to all Thrusters that collides, e.g. can be used as a temporary disable an engine when they hit a spike

PathLineDraw - populate a Unity.LineRenderer with a PathActor next nodes.

You can combine any controller or helper with any thruster!

Debug

All the components have a DebugLog flag, when turned on it displays in the console relevant messages. Example the debug flag on a controller will throw a message each time a key press is detected and the action was made. Use relevant gameobjects naming as they will be displayed in the debug messages. Example: attach the Controller component to a "ControlThrusterLeft" game object so you will know from which controller the debug came from.

Contact

Reach out for pre-purchase questions, support or feedback:

What's next?

  • improvements, fixes and new features based on your feedback
  • more2D thrusters
  • powerups and debuff system (on-the-fly change thruster properties like min/max throttle)

Common Q&A

  • Why is the package so large (6mb)? The scripts size is 100kb, the rest are the assets for the DEMO scenes, you can remove them at any time. You do NOT require the subfolders "Demo" and "Identity".
  • What platforms are supported? Should work on any platform, contact me to solve any possible issues.
  • Can I control the Thrusters with DoTween, iTween, my own scripts, etc.? Yes, you will need the Controllers.BThrusterPropertyRelay component to directly control the thrusters' properties and states.
  • Can I use multiple controllers for 1 thruster? Key vs joysticks Yes but you have to be careful, they will most likely cause problems/conflicts, same as having 2 bosses and 1 employee. You should have at most 1 controller that auto decelerates.
  • The AppliedCollider component does not work!?! Check the following:
    • force, throttle are positive numbers
    • the thruster does not fault
    • The "victim" must have: A RigidBody that is NOT kinematic, a 3D Collider, mass > 0
    • check the thruster Radius, you can see it in the Scene Editor (see Gizmos)
    • if a red line is drawn in the Scene (debug line) then the force is applied, increase the Force
    • The "victim" Rigidbody does not have constraints on X/Y/Z position
    • The "victim" GameObject has the same Layer as the Thruster's "Affect only layer" value

Change log

v.1.0

First release. Includes 4 types of Thrusters (2 physics based), 4 controllers and 5 Helper components for extra functions.

v.1.1 (Nov 2017)

  • FIX SetThrottle100Value - the function didn't work as expected
  • NEW BThrusterContinuousController - a new controller for continuous movement mechanics like Flappy Birds.
  • NEW BThrusterAppliedCollider - a new thruster, that applies force to OTHER objects, used for simple magnet/gravity attract/repel mechanics
  • NEW BThrusterHelperUISlider - added autoStart and applySliderValueOnStart parameters
  • FIX README youtube channel URL
  • NEW 3 demo scenes with 7 examples

v.1.2 (Dec 2017)

  • NEW BThrusterPathActor - new thruster that only follows a specific path
  • NEW BThrusterPathNode - represents a point in a path that the Actor must follow
  • NEW BThrusterPathLineDraw - populates a Unity.LineRenderer with an Actors path
  • NEW 2 new demo scenes for Path thruster with 3 examples
  • FIX Continuous controller - it kept working even after the component was disabled

v.1.3 (Feb 2018)

  • Online documentation (Manual) and website
  • NEW BThrusterHelperPathMoveNodeAtTouch - move a Path Node at Click/Touch position for 2D Click to Move
  • UPDATE HelperFaultCollision - now work with 2D Colliders too
  • FIX PathActor - error when Restart before creating a segment

v.1.3 (Feb 2018)

  • Online documentation (Manual) and website
  • NEW BThrusterHelperPathMoveNodeAtTouch - move a Path Node at Click/Touch position for 2D Click to Move
  • UPDATE HelperFaultCollision - now work with 2D Colliders too
  • FIX PathActor - error when Restart before creating a segment

v.1.3.1 (Feb 2018)

  • FIX compiler error (Animations namespace)
  • Basic UnitTests

v.1.3.2 (April 2018)

  • added HelpURL attributes to all components, for easy documentation access
  • added the Conditional("ENABLE_LOGS") attribute to base log to strip all the Log() calls from production
  • optimized AppliedCollider, removed the need of memory allocation for each fixed update