flightmare_unity icon indicating copy to clipboard operation
flightmare_unity copied to clipboard

Allow spawning multiple prefabs

Open francofusco opened this issue 4 years ago • 2 comments

This PR deals with uzh-rpg/flightmare#77. More specifically it slightly changes the CameraController.cs script so that any prefab in the Templates folder can be spawned. All trailing white spaces in the modified sources were also removed.

A demo in flightmare (showing that these changes do work) is being proposed in the sibling PR uzh-rpg/flightmare#125.

@yun-long and @slimeth there are still 2 improvements that I would like to introduce, but I prefer having your feedback first:

  1. Currently, if you try to spawn a prefab not appearing in Templates, you will get a rpg_gate instead. I would prefer to create a new prefab, e.g., a cube with "404 not found" written on it, and spawn that instead. I think that showing such kind of object makes it much clearer that an error occurred.
  2. Currently, you can only add objects, but I have already worked on a variant of the scripts that also allows to remove them. Do you think such a feature is desirable? If so, I'll polish my solution and add it to this PR.

Cheers!

francofusco avatar Apr 29 '21 14:04 francofusco

Ping!

francofusco avatar May 27 '21 12:05 francofusco

LGTM @francofusco regarding your improvement suggestions. I think both of them make sense and especially the features to remove objects is desirable.

Thank you for your great work!

slimeth avatar Jun 06 '21 22:06 slimeth