Previously, the system expected only one blueprint to have pozyx enabled (# TAG isPozyxControllable true). If more than one blueprint had it set to true, the system would simply always pick the first blueprint it found when assigning a tag to a blueprint.
This adds a feature where the sim will now randomly choose a blueprint if more than one blueprint has isPozyxControllable set to true.
NOTE: This is not using the seeded random number generator so that students will actually get random assignments. This potentially breaks the replayability of the sim however. (Currently this is not a problem since we do not have recording and playback at the sim level).
This also fixes a bug where PTrack and FakeTrack control inputs were being skipped during the InputsUpdate cycle.
To Test
Open a project with more than one blueprint.
Set two blueprints # TAG isPozyxControllable true.
Move a tag into the sim area. It should automatically be assigned to one of the blueprints.
Move a second tag. It should also be randomly assigned.
Reload Main. The tags should be randomly re-assigned.
Merges dev-bl/random-pozyx-bp-select -> dev-next
Previously, the system expected only one blueprint to have pozyx enabled (
# TAG isPozyxControllable true
). If more than one blueprint had it set to true, the system would simply always pick the first blueprint it found when assigning a tag to a blueprint.This adds a feature where the sim will now randomly choose a blueprint if more than one blueprint has
isPozyxControllable
set to true.NOTE: This is not using the seeded random number generator so that students will actually get random assignments. This potentially breaks the replayability of the sim however. (Currently this is not a problem since we do not have recording and playback at the sim level).
This also fixes a bug where PTrack and FakeTrack control inputs were being skipped during the InputsUpdate cycle.
To Test
# TAG isPozyxControllable true
.