I’m using Babylon on a node js project to keep track of game state, but whenever I try to instantiate a vector3 and send it to the client, the result is always an isDirty vector3, and x y and z properties don’t get included… Any chance to disable or chance this behavior?
How do you send the Vector3 to the client?
using socket.io (which admittedly I’m fairly new to)
You need to serialize it in some way.
You could do something like this:
Server send: JSON.stringify(vector)
Client receive: new Vector3().copyFrom(JSON.parse(data))
Too bad, before the advent of this _isDirty property, this was not necessary.
Using vector.asArray() and Vector3.FromArray() would greatly reduce the transfer size which is smthg to consider as well