Commit graph

4 commits

Author SHA1 Message Date
Erik Ogenvik
84923d0c39 Rotate in local space. 2016-06-26 20:17:18 +02:00
Erik Ogenvik
923f037b13 Introduce a separate Transforms class.
Used to hold transformation data, and serializing to Atlas.
2016-06-26 20:16:48 +02:00
Erik Ogenvik
4d4cdbef23 Fixed tests after transforms property. 2016-06-26 20:13:31 +02:00
Erik Ogenvik
d5d11df11e Let "transforms" property determine pos and orient
Instead of directly setting position and orientation we've now
added a "transforms" property. This property contains zero or many
transformations. The result of these is what drives changes to an
entity's position and orientation.
By cleanly separate disrete transformations we can more easily undo
or alter them. This allows us to do things where the position or
orientation of an entity is affected by other properties, or other
entities.

The client protocol is intact. Changes to position and orientation is
still sent the same way, by specifying "pos" and "orientation". However,
these values will now not be written directly to corresponding values on
 the entity. Instead they will first be written to the "transforms" property,
with the final values being a result of combining all data in the property.
2016-06-26 19:11:15 +02:00