Spider Engine 1.3.0

This update focuses on character control in 3D. It has an initial support for Inverse Kinematics, Character Colliders, and Animation Blending. There are also improvements in several areas of the engine and the editor.

Live Demos

Major Features

  • Implement CharacterCollider
    • Continuous collision detection and response against a 3D polygon soup
    • Smooth sliding against walls and small obstacles
    • Built-in support for gravity
    • Support capsule-like collision shape
  • Low level components for Inverse Kinematics
  • Add custom IK solver for feet IKFootSolver
    • Simple analytical solution in 2D that looks good. Generic IKSolver (Fullik) doesn’t work well for feet
  • Fork Fullik library and add it as a git submodule
  • Animation improvements
  • Engine update improvements
    • Significantly reduce the number of hierarchy traversals necessary to collect components during the update
    • Tick animation before behavior, so that ray-casts are based on animation positions not IK positions
    • Make sure components deactivated in Behavior update are not updated in the current frame
  • Change default behavior of Entity traversal.
    • Continue traversing if handler returns true or undefined

Minor Features

  • Improve Collision and Visual filtering API
  • Behavior
    • Expose Input interface
    • Console log forwards parameters as-is to the system console instead of formatting to string
    • Support onBehaviorStarted() hook in code block nodes
    • CodeBlocks: update loading status regardless of error status
  • Improve handling of enum properties
    • Re-use enum object to deduce enum literals, instead of defining a literals class
    • Serialize enums using their literal name instead of their value. This produces a much more readable json data
  • Fix lighting on skinned meshes
    • When skinning is enabled, geometry and normals are determined based on bone transforms (which are in world space)
    • Previously, the renderer was including the influence of the entity’s world transform, which caused normals to be double transformed
    • As a side effect of this fix, localMatrix is no longer an engine managed uniform and was removed from default shaders
  • Vector3 improvements
    • normalize() was discarding legit input values
    • divide() was performing more divisions than necessary
    • Avoid using property getters internally, use private member properties directly.
  • Add utility to query multiple components in a single scene traversal
  • Serialization: Ensure components are serialized in their intended order
  • GeometryRenderer: Support drawing non-uniform sphere shapes (good to represent capsules)
  • Collider component: ensure a Transform component is present
  • UI components: Ensure a Layout component is present
  • Added Transform.worldPosition setter. Ensures position is as expected regardless of the Transform’s hierarchy.
  • Make Plane Colliders compatible with Cannon.js
  • Add Engine.isLoadingInProgress() method. Useful to show loading status in host applications.

Editor Changes

  • FBX Importer: Support models with multi-materials
  • Support defaultType attribute, useful for defining the default value of elements in arrays of objects
  • Support nullable attribute, useful for making reference properties non-clearable in the editor
  • Bone: Hide fbxId property from properties view
  • ModelSkinnedMesh: hide bone IDs from properties view
  • Avoid loading graphic objects when the first scene is loaded

Bug fixes

  • Shader
    • Ensure parameters are initialized even after shader was just invalidated
    • Shaders may get invalidated in case of a global renderer changes (such as activating wireframe)
    • This ensures shader parameters are immediately initialized after invalidation so newly created materials referencing invalidated shaders are initialized correctly
  • Behavior
    • Avoid redundant destruction of resources references by data pins
    • Ensure the input pins are initialized before initState() is called on behavior nodes
  • Transform
    • Avoid spamming transform change events when moving an entity to a different parent
    • Make sure the transform and layout are updated after the switch to the new parent is completed
    • Queue change callbacks until entire hierarchy is processed. This guarantees that callbacks receive valid transforms
    • Fix crash when setting the worldPosition property on a Transform with no parent
  • Component query now ignores inactive entities
  • Serializer: Fix crash when setting properties deriving from ReferenceArrayBase