Editor improvements: dragging scenes to viewport, undo for gizmos, better docs

Posted on

Drag and drop fun:)
  1. You can now drag scene files (like glTF, X3D, images…) from the “Files” bottom panel onto a viewport. It will automatically create a TCastleScene instance with proper URL that displays this model.

    The initial translation is determined by the point where you drop the item, with some smart code that should account for both typical 2D (orthographic) and 3D (perspective) needs.

    • In case of 3D (perspective), we try to place new scene origin exactly at the 3D position at the drop point. Or just 10 units in front of the camera (if nothing was hit).

    • In case of 2D (orthographic), we try to place new scene origin 1 unit closer than the object present at the drop point. So the new scene is in front. In case nothing was hit, we place object at the middle of ProjectionNear and ProjectionFar (which will be 0 by default).

    Thanks go to Andrzej Kilijański for doing this!

  2. Undo system now works for gizmo operations (moving, rotating, scaling of TCastleTransform) in the editor. Thanks to Eugene Loza!

  3. Improved manual page about the editor.

    I am also encouraging everyone to watch Castle Game Engine – introduction to the engine and editor, which is our video introduction from Debian conference, already announced here 🙂 I have embedded this video on the manual page, as well as the getting started page.

Notable Replies

  1. Do these changes apply to the binary downloads linked from the main page or just to the latest source code on GitHub?

    In other words, are the package downloads for all platforms kept up to date with the latest source code?

  2. In short - yes.

    They’re lagging a bit, but not significantly. You may always check to which source code version do the binaries correspond in https://github.com/castle-engine/castle-engine/releases/tag/snapshot : look for the line "14 commits to master since this release " - this means that this current snapshot “lags” behind source code by 14 commits (most likely you’ll miss https://github.com/castle-engine/castle-engine/pull/239 from 2 hours ago). I think this lag is always less than half a day.

Continue the discussion at Castle Game Engine Forum