private void Start() { rb = GetComponent <Rigidbody>(); sim = GetComponent <TrackedVehicleSimulator>(); command = GetComponent <CommandInput>(); leftTempPublisher = gameObject.AddComponent <PublisherLeftPreRamp>(); rightTempPublisher = gameObject.AddComponent <PublisherRightPreRamp>(); leftTempPublisher.topic = left_publish; rightTempPublisher.topic = right_publish; final = gameObject.AddComponent <TorqueSubscriber>(); rightFinal = gameObject.AddComponent <RightTorqueSubscriber>(); final.topic = left_subscribe; rightFinal.topic = right_subscribe; r = sim.Width() * 0.5f; gravity = Physics.gravity.magnitude; }
private void Start() { sim = GetComponent <TrackedVehicleSimulator>(); Subscribe(); }