Hi
Reporting, not sure if this is considered a bug. When I set a kinematic moveTo, the Space needs an update first before it takes effect. If not, the moveTo is never executed.
Kinematic moveTo needs Space.update first 0.9.0
Re: Kinematic moveTo needs Space.update first 0.9.0
To check the result, are you using internalCenterPosition or centerPosition? The centerPosition field is buffered and as such requires a space.update to show the latest data. The internalCenterPosition on the other hand accesses 'internal' data directly.
Re: Kinematic moveTo needs Space.update first 0.9.0
I'm using moveTo. The order like this won't work
start program
moveTo
update
update
update
this will
start program
update
moveTo
update
update
update
start program
moveTo
update
update
update
this will
start program
update
moveTo
update
update
update
Re: Kinematic moveTo needs Space.update first 0.9.0
Performing an update prior to a moveTo should not have any effect compared to not updating prior to a moveTo. For example, in the demos project, you can move the ground entity in the startSimulation method before any update occurs using moveTo and it will have the expected result (the ground is moved).
Entity.moveTo is a direct modification of the internal center position without any buffering. It does not wait for an update to occur to take effect. This is reflected in the Entity.internalCenterPosition property, which directly accesses the value with no buffering.
On the other hand, if the centerPosition property is checked immediately after a moveTo, it will not appear that any change has occurred if no update has yet taken place, because the centerPosition property is buffered.
Entity.moveTo is a direct modification of the internal center position without any buffering. It does not wait for an update to occur to take effect. This is reflected in the Entity.internalCenterPosition property, which directly accesses the value with no buffering.
On the other hand, if the centerPosition property is checked immediately after a moveTo, it will not appear that any change has occurred if no update has yet taken place, because the centerPosition property is buffered.
Re: Kinematic moveTo needs Space.update first 0.9.0
I was setting the kinematic entities in my loading script to follow the visual after they are created. Without the first update, they are not moved there.