Erik Ogenvik
72c6163d36
Scale visibility spheres, so they are smaller.
...
Bullet is optimized to work with "human sized" collision objects.
By making the visibility spheres too large we tax the system too much.
Better to scale the position the other way.
2017-02-18 23:04:51 +01:00
Erik Ogenvik
8f1373d18c
Apply z-offset correctly.
2017-02-14 17:57:40 +01:00
Erik Ogenvik
9d873cf079
Removed kinetic character controller.
...
The performance is just too bad, we can't use it with the amount of
characters we intend to support.
2017-01-31 23:05:46 +01:00
Erik Ogenvik
696033a8fd
Added ability to jump.
2017-01-31 22:14:01 +01:00
Erik Ogenvik
69f99f3302
Improve performance for static entities.
...
We do this by deactivating automatic aabb updates for static entities.
And also by using the COLLISION_MASK_STATIC mask for static entities.
2017-01-29 23:07:51 +01:00
Erik Ogenvik
651ea52a70
Set correct mask and filter for terrain.
2017-01-29 20:46:16 +01:00
Erik Ogenvik
95be39e268
Provide single method for setting velocity.
2017-01-29 20:45:23 +01:00
Erik Ogenvik
09ff936111
Turn on CCD to prevent tunneling.
2017-01-29 17:06:39 +01:00
Erik Ogenvik
12e6eb4cfc
Clip free objects to terrain.
2017-01-28 16:38:37 +01:00
Erik Ogenvik
6b4302dc5f
Let property handle tick rate.
...
And other smaller fixes to the physical domain.
2017-01-27 20:39:00 +01:00
Erik Ogenvik
d40c2261e1
Added comments for clarity.
2017-01-22 19:26:37 +01:00
Erik Ogenvik
93f3450ea5
Only send changed location data.
...
To try to keep the amount of data down.
2017-01-21 14:31:19 +01:00
Erik Ogenvik
fb89b03302
Added ability to jump.
2017-01-05 00:28:31 +01:00
Erik Ogenvik
c15a2f80cd
Implemented more functioanlity for characters.
2017-01-04 23:25:46 +01:00
Erik Ogenvik
6eb030d29d
WIP on using character controllers.
2017-01-03 23:05:16 +01:00
Erik Ogenvik
21f62ea137
Moved shape creation to geometry property.
...
This optimizes mesh handling, since only one btBvhTriangleMeshShape
instance will be created per type.
2017-01-02 23:52:49 +01:00
Erik Ogenvik
66d8c6145a
Fixed some smaller issues.
2017-01-02 00:34:38 +01:00
Erik Ogenvik
de8b920b29
Take mass offset into account when setting pos.
2017-01-02 00:33:24 +01:00
Erik Ogenvik
fd5e3d79e1
Add support for mesh geometry.
...
For now we only allow this for static geometry.
All code is provisional; we should move parsing to the Geometry
property and make it reuse scaled meshes.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
0940522913
Improvements to terrain handling.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
615db49b2b
Fixed incorrect setting of flags.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
d8adee3c10
Don't update if no change.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
900dd544ea
Cleaned up some smaller issues.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
4cdaf7f409
Correctly send entity id and seconds.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
fb33b38fd6
Make sure to set seconds on sight op.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
bd42f89527
Removed unused method.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
e6d7a27485
Improve debug logging.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
645cf8b975
Process dirty terrain areas per tick.
...
To spread the load.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
d02d3b76f3
Also apply terrain mod when adding entity.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
d64e892721
Update axis boxes when changing vis objects.
...
Since we don't simulate the world we need to do this ourselves.
We rather update per each object than call "updateAabbs()" each tick,
for performance.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
b4d3a994a3
Update terrain correctly.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
3e4d03b9d7
Update for changed Mercator API.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
c5583e149f
Port terrain mod translator from Ember.
...
Since it's more common that the position changes that the mod itself does
we want to pre parse the data in the translator first, and then supply
the pos and orientation when creating the mod.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
3238b0b94c
Let the domain handle terrain mods.
...
We can't just listen to Move ops, since we now let the Domain
handle movement.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
e7c3892d57
Added support for cylinders as geometry.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
fb5d3ae9b7
Apply transform when updating new pos and orient.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
8bea81fa21
Toggle perception in domain when it changes.
...
Though for now we'll never remove it once an entity becomes perceptive.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
44e999ab6d
Send sights directly to entities observing.
...
For performance, since we're already in the domain.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
62f7361576
Remove old code.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
fe709529fe
Synchronize visibility methods in Domain.
...
So that they behave the same way.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
0a133c75bc
Handle broadcasts earlier.
...
Instead of handling broadcasts when the op is dispatched, handle them
when the op is first added to the world router.
This way we can better handle the case where an entity is deleted, as well
as make away with storage of perceptibles entities in the world router.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
fd34c235e4
Remove "transforms" and "modespec" property.
...
These properties didn't work out when we moved to a physics based world.
Instead we've introduced the properties "planted-offset" and "planted-scaled-offset".
These properties takes a float and specified vertical offset for planted entities.
Likewise with "planted-rotation" which specifies a rotation applied for planted entities.
"active-rotation" keeps track of any applied rotation.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
7b19e67cb8
Make sure domain updates when terrain updates.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
f2cd26c18b
Remove old code and scale with time.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
12bce51794
Clean up better.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
6c6a6eb0b0
Don't check visibility each tick.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
aa88be1ea7
Make sight checks more efficient.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
5d98e768c7
Refactored visibility handling.
...
To allow for better performance when scaling to larger worlds we can't keep
iterating though all entities when checking visibility.
Instead we now have the PhysicalDomain keep track of all entities that are
either observering something, or being observed.
Since Bullet already contains efficient structures for doing space partioning and
collision detections we'll resuse that for visibility checks.
Each entity now has a sphere of "visibility" with which each perceptive entity does
checks against.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
5557f0cfc2
Remove old code.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
cf5393ae99
Set initial time to zero.
2016-12-15 18:27:42 +01:00