Repository navigation
Vortex Engine v3.4.16 — Characters and rays you can trust
Vortex Engine v3.4.16 — Characters and rays you can trust
Seven physics bugs reported by @patii132, which were the last open bugs he reported. Also fixed: loaded entities that all shared one engine id, and the template bots' blind spot.
Characters
- A character no longer collides with itself.
Physics.MoveCharacterignores the colliders of the moving entity and its children, so a guard with a solid hitbox stays on the floor and gets noOnCollisionEnteragainst itself. This works with both controllers.Physics.CanStandexcludes them too. (#417) - Characters leave when their entity does. Destroying, deactivating or ragdolling an entity removes its character capsule, including its Jolt character. The new
Physics.RemoveCharacter(id)does it by hand, and a laterMoveCharacterwith that id brings the capsule back. A Nav Agent whose body goes limp leaves the crowd, refusesSetDestinationandWarpwhile limp, and rejoins where it went down. (#407) - Inactive colliders take no part. A level part saved inactive, or anything under an inactive parent, no longer blocks characters, and switching it on adds it once. (#443)
- Ramps are ramps. Pitched and rolled box colliders keep their full rotation in the character world. A 10–30° ramp is walked up instead of acting as a wall at its foot or a ghost slab you walk under. (#498)
- A MeshCollider's own mesh collides. A MeshCollider that names its own collision mesh now blocks characters and managed raycasts, like its Jolt body and the navmesh already did. A collider that yields no shape says so once. (#500)
Rays and queries
- One rule on both physics paths.
- A ray that starts inside a convex collider passes it. A ray that starts exactly on a surface hits it.
- Meshes are hit from either side, and the hit normal faces the ray's origin.
- A surface exactly at the maximum distance counts.
- The managed and Jolt paths now give the same answers. (#418)
Physics.Raycast(…, ignoreEntity)skips the whole entity: its colliders, its ragdoll parts and its character capsule. An AI's line of sight no longer stops at its own collider. (#406)- Jolt character capsules report their entity, so a shot that hits a player moved by the "jolt" controller names the Player. (#406)
- New
Physics.OverlapPoint(point)returns the entities whose colliders contain a point. It works with and without Jolt. A point counts as inside a mesh only when the mesh closes around it, so an open roof or a cave shell contains nothing.
Entities
- Every loaded entity has its own engine id. Entities loaded from a scene file, and their duplicates, pastes and prefab instances, all used to share engine entity 0. Their transforms went to it, and deactivating one of them removed it from under the others.
- Delete, undo and closing a project take an entity's engine twin with them, and undo brings it back.
- A scene that isn't open stays out of the engine. Applying a prefab whose instances also live in a scene you never opened no longer activates that scene or applies its fog and exposure to your viewport.
Foliage.Find()returns an entity handle likeScene.Find. It used to return 0, meaning "none", for every foliage layer loaded with its scene.
Templates
- Template bots see the player. Their eye ray no longer stops at their own capsule, so they engage, take cover and shoot in the Range scenes. Their muzzle rays leave impacts and decals on walls. Their shots don't hurt the player yet: the player's health sits on its own entity. The next update moves it onto the Player.
- Mantling checks the whole standing capsule on top of a ledge and never climbs into a wall taller than a ledge.
Who owns a character
A characterId names an entity when it is the calling code's own EntityId. That code can be a behaviour, a behaviour-tree task, an entity's area handlers or its UI actions. The new overload Physics.MoveCharacter(feet, radius, height, move, characterId, ownerEntity) names the owner directly, for a manager script that moves several NPCs. A capsule keeps its owner when other code moves it later. Custom ids that belong to no entity stay anonymous.
Behaviour changes for script authors
- A manager script that moves NPCs by their ids should name the owner with the new overload. Otherwise an NPC whose own code never moved it is blocked by its own colliders.
- A ray that points away from a surface it starts on reports no hit.