Commit Graph

24 Commits (84f8a6848a8b05502d7618ca7af8cca74f2c3bae)

Author SHA1 Message Date
elsid 948e2f5db9
Do not use collision shapes with visual only collision to generate navmesh
These collision shapes are not used for actors movement physics simulation.
2 years ago
fredzio d05a2facf3 Handle NCC flag in Nif files. Objects with this flag will collide only with camera.
Expose objects with NC flag to be used by Lua mods.
3 years ago
elsid d7041613ef
Store BulletShape source file name and content hash 3 years ago
elsid b731a981c4
Make BulletShape::isAnimated inlined 3 years ago
elsid c83facd9d3
Avoid redundant osg::ref_ptr<const BulletShape> copy 3 years ago
elsid 8e71c246bf
Remove redundant BulletShape getters 3 years ago
elsid fc9a405dc5
Make BulletShape::makeInstance free function 3 years ago
elsid b905dd17c3
Use unique_ptr to store btCollisionShape in BulletShape 3 years ago
elsid 80e3623d9a
Avoid dynamic cast in duplicateCollisionShape 3 years ago
elsid ca8584f6f6
Move functions independent from BulletShape into anonymous namespace 3 years ago
jvoisin deb2af6acc Dont copy-construct from a const-ref when used only as a const-ref
This also makes clang-tiny a bit happier
3 years ago
elsid c8987bda2f
Store reference to BulletShapeInstance for btCollisionShape
To keep btCollisionShape lifetime.
3 years ago
fredzio c795e0bce6 Some actors are supposed to spawn on an object that belongs to an adjacent cell.
Since actors can be active in 3x3 grid around the player, we need to
first load all objects in a 5x5 grid around the player.

Split load and unloading in 2 phases. Add an mInactiveCells set into the
scene, which contains all cells inside the aforementioned 5x5 grid.
These cells contains only heightfields and non-animated physics objects.

Animated objects are tied to the scene graph, which doesn't exists yet
in these cells, so we skip them.
4 years ago
Alexei Dobrohotov 15291f15d3 Make actor collision box components a struct 4 years ago
Andrei Kortunov 3032b177a1 Remove redundant includes 6 years ago
elsid fa23b590a4
Add unwalkable areas to NavMesh 6 years ago
elsid f6a60790f8
Create collision shape for all avoided nodes 6 years ago
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 6 years ago
scrawl 83a9a164bc Raise the required bullet version to 2.83
2.82 appears to have a bug that causes the player to be able to phase through certain objects (bug #1587).
9 years ago
scrawl e055ae094a Improve const-correctness in BulletShapeManager
Sadly, two const_cast's are needed to work around Bullet API quirks.
9 years ago
scrawl 909c4d96b6 Use the osgDB::ObjectCache in BulletShapeManager 9 years ago
Tobias Kortkamp 0659687bfb Some fixes for building on FreeBSD 9 years ago
scrawl e49bce7b40 Share the bvh of btBvhTriangleMeshShape's when possible
Results in decent cell-loading speed up. (only affects bullet versions < 2.83, since we use btScaledBvhTriangleMeshShape for >=2.83)
9 years ago
scrawl 8cf57ef6ac Move BulletShapeManager and BulletShape to resource/ 9 years ago