When converting portal meshes during import, indices were not being taken into account, which could lead to incorrect estimation of the portal direction. This PR now copes with either indexed or non-indexed portal meshes.
Added a bug fix to cope with portals pointing almost directly straight up or down, which could cause problems with the lookat transform.
Added the ability for named portals to link to short room names (in addition to postfix room names).
The PVS mode enum had been declared using scope operator, which does not seem to work correctly from GDScript with the BIND_ENUM_CONSTANT macro.
This PR removes the scope operator in the declaration.
For both 2D and 3D, three methods are added:
- `get_floor_angle` on `KinematicBody` to get the floor angle.
- `get_angle` on `KinematicCollision` to get the collision angle.
- `get_last_slide_collision` to quickly get the latest collision of `move_and_slide`.
Update mesh_surface_get_format_stride and
mesh_surface_make_offsets_from_format to return an array of offsets and
an array of strides in order to support vertex stream splitting
Update _get_array_from_surface to also support vertex stream splitting
Add a condition on split stream usage to ensure it does not get used on
dynamic meshes
Handle case when Tangent is compressed but Normal is not compressed
Make stream splitting option require a restart in the settings
Update SoftBody and Sprite3D to support and use strides and offsets
returned by updated visual_server functions
Update Sprite3D to use the dynamic mesh flag
Add framework for supporting geometrical occluders within rooms, and add support for sphere occluders.
Includes gizmos for editing.
They also work outside the portal system.
Applying the platform velocity when leaving the platform floor should be
done after snapping to keep things consistent.
Now it's done in both 2D and 3D, as it's already done in 2D on master.
Same thing that was already done in 2D, applies moving platform motion
by using a call to move_and_collide that excludes the platform itself,
instead of making it part of the body motion.
Helps with handling walls and slopes correctly when the character walks
on the moving platform.
Also made some minor adjustments to the 2D version and documentation.
Co-authored-by: fabriceci <fabricecipolla@gmail.com>
When synchronizing KinematicBody motion with moving the platform using
direct body state, only the linear velocity was taken into account.
This change exposes velocity at local point in direct body state and
uses it in move_and_slide to get the proper velocity that includes
rotations.
Fixed a bug in the complex PVS generation which was causing recursive loop.
Move some of the settings out of RoomManager into Project Settings.
Allow PVS generation method to be selected from Project Settings, and control PVS logging.
The checking for link room IDs was checking for less than size(), but was not correctly checking for -1,
and therefore reading outside the array range. This PR fixes this.
Portal autolinking was previously agnostic to room priorities, which meant that portals would link to the first room they found (often outside rooms). This PR fixes this by making the autolinking priority aware, and will preferentially link to internal rooms.
Fixes a bug whereby it read from the primary PVS in the gameplay monitor, using the size from the secondary PVS. This would read out of bounds and crash.
Removed debug code to update the gameplay monitor from the preview camera - this is no longer required.
Temporarily revert to the simple PVS generation method, because I've noticed a bug in the complex version, and the simple version is safer while I fix this.
Calling rooms_set_active with TOOLS_ENABLED from a running project resulted in a crash because the Spatial Editor is not available. Wrapped it in an is_editor_hint.