Commit graph

129 commits

Author SHA1 Message Date
Erik Ogenvik
596ffad815 Added properties for geometry and angular factor.
For now we'll only support a limited set of geometry shapes.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
5af22f8b13 Use sphere if capsule too short. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
d5d73cbf61 Limit vertical movement. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
531a23bf2e Update bullet collision shape when bbox changes. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
45a794e87b Make it possible to detect non-moving entities.
Do this by keeping tabs on those that moved, and any that now have stopped.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
149c143bd2 Send move sights on angular change too. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
1ffc1a9f4c Handle gravity when moving. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
b037cd9b95 Handle change of solidity and mass. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
27ce71a409 Store last sent location. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
31876516a7 Removed unused field. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
f1df4f7979 Handle changed mode prop. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
64c12e8745 Make both fixed and planted entities static.
But make "planted" be adjusted by terrain.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
b77bfbe013 Remove old functionality for adjusting height. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
8ad1b8d9cf Handle non-solid entities.
Entities which has the property of solid=0 are non-solid.
They won't collide with solid entities, nor with other non-solids entities.
The only thing they will collide with is the terrain.
2016-12-15 18:27:42 +01:00
Erik Ogenvik
9aeeeeab54 Apply friction to the terrain. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
eabd7d9e90 Listen to updates to friction. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
da5f8f8e56 Added a friction property for physics. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
0ddbe6c59a Properly rotate terrain. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
f918af4575 Make sure ticks are consistent and fix velocity. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
c179e2829b Further work on entity placement. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
83b6ee7984 Set propel force each tick. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
b2a96d31f7 Further work on Bullet integration. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
5754a5dfa1 Initial work on Bullet powered physical domains. 2016-12-15 18:27:42 +01:00
Erik Ogenvik
12a38b3d0f Added a mode specification property.
This property tells how the entity should behave when put into
different modes. Currently we only allow for specific transformations
to occur.

The mode specifications are registed in properties where "mode-" forms
a prefix, and the mode a suffix. For example, "mode-planted".
This also does away with the "plantable" property.
2016-06-26 20:17:18 +02:00
Erik Ogenvik
d7bf27d180 Take plantable adjustment into account.
When an entity which is "planted" is adjusted, we also look
for if there's any offset specified for the height adjustment.
2016-06-26 19:08:54 +02:00
Erik Ogenvik
4f4a204935 Turn off debug logging. 2016-06-26 14:18:18 +02:00
Erik Ogenvik
760f92f707 Alter how visibility is determined.
When checking visibility, we now use the Domains more extensively.
The base rules are:
* If an entity is a child of a domain-less entity, visiblity for the
  child is the same as for the parent.
* If an entity is a child of a domain-holding entity, visibility is
  determined by the Domain.
* Entities cannot observe things above a Domain.
* Entities can observe things below a Domain, if the Domain allows it.

These rules are not yet set in stone. We need some more time figuring out
exactly how we want visibility implemented. We're striving for a balance
between a powerful but not too complex system, with good performance.
2016-06-22 17:29:27 +02:00
Erik Ogenvik
3456d3f30a Return Unseen if Sight fails.
This should fix an issue with flushing not working, as well as making
the protocol work in a more stringent manner.
2015-04-15 23:07:28 +02:00
Erik Ogenvik
3b1a2cb566 Make Domain an interface and provide two versions.
The "physical" world behaves like a standard world. The "void" world
however doesn't allow for neither movement nor sights.
2014-09-24 22:00:54 +02:00