#When Child Transforms Update?
1 messages · Page 1 of 1 (latest)
This would be pretty trivial to test yourself but yes, they change immediately
Are you sure this is true, Im currently running calculations based on child object positions, in the same frame the parent object is set, the calculations seem to be running on stale positions
I mean you could log the positions before and after and check
it should be before lateUpdate.. a while back I dumped whats in the engine's PlayerLoop.. in there you can see all tons of execution order.. here some of the stuff in it, cant put them all here, there are crap tons of stuffs there :
PreLateUpdate
AIUpdatePostScript
DirectorUpdateAnimationBegin
LegacyAnimationUpdate
DirectorUpdateAnimationEnd
DirectorDeferredEvaluate
UpdateNetworkManager
UpdateMasterServerInterface
UNetUpdate
EndGraphicsJobsLate
ParticleSystemBeginUpdateAll
ScriptRunBehaviourLateUpdate
ConstraintManagerUpdate
PostLateUpdate
PlayerSendFrameStarted
DirectorLateUpdate
ScriptRunDelayedDynamicFrameRate
PhysicsSkinnedClothBeginUpdate
UpdateCanvasRectTransform
PlayerUpdateCanvases
UpdateAudio
ParticlesLegacyUpdateAllParticleSystems
ParticleSystemEndUpdateAll
UpdateCustomRenderTextures
as you can see, the CanvasRectTransform update is in the the lateUpdate there, so transform should be before lateupdate
again, thats a cut down version, it wont fit to copy/paste without attaching as file... its massive
also I'm just guessing here, feel free to fact check yourself
There isn't a separate process that updates child object positions. The position of an object is its local position + parent global position. If the parent's global position changes then the child's global position changes immediately
yeah, I sorta misunderstoodthat, realized it after reading your comment, thought dude was asking the order
If you're having problems with stale positions, post the entire relevant code and ask about the actual issue. Transform positions lagging behind after a simple assignment of the parent isn't causing it
Im creating a full client predicition & reconciliation model for my game its not something i can just paste into a chat, movement is complicated and influenced by a bunch of dynamic in scene stuff. Its fairly hard to just debug. But ill do a simpler test