Skip to content

LpsManager

4rzael edited this page Sep 1, 2017 · 4 revisions

LpsManager

Role

This scripts handles everything related to LPS nodes. It can create them, store their positions, and send them to the drones.

Interface

  • Lps Node Prefab : The Prefab used to visualize LPS nodes

  • Lps Nodes Positions : Nodes position configuration

    • Size : Number of nodes
    • Elements : The position of each element (Y being the height)
  • Lps Osc Topic : The lps module topic in the drones OSC server

  • START : Shouldn't be useful, act as if the script started up

  • Recreate nodes : Recreates LPS GameObjects from the positions stored in this manager

  • Send config through OSC : Sends the nodes positions to the drones OSC server. Useful if it didn't work at startup.

    • NOTE : The position sent is the one stored in the manager, not the GameObjects one. Yeah. That's strange.
  • Save positions : the opposite of Recreate nodes : Retrieve the positions from the LPS GameObjects and store them in this manager.

  • Remove nodes : Remove LPS GameObjects from the scene.

Code

  • On startup, the function public void recreateNodes () is called if there are missing LPS nodes GameObjects in the scene

This script does not have many interesting public methods but here they are :

  • public GameObject GetNodeById(int id) : Gets the LPS GameObject from the node ID.
Clone this wiki locally