I am experimenting with some simulation software to integrate it into Unity and I need a way to intercept changes to the transform in order to update my collision proxies. This is such a basic engine feature that I am surprised it doesn’t exist already. I must be missing something?
?
As for getting the specific change, I dunno, there’s so many ways a transform can ‘change’ (Animtion, rigidbody, hinge, wind, script, joint, mecanim)
Keep track of a ‘before and after’ set of pos/rot/scale mb
I need an event when that happens.
Say you have some kind of collision system which supports ray casts. Usually when a game object moves it would flag the associated proxy as dirty. Then when some game object casts a ray all dirty proxies need to be updated to be at the right location in space. You really cannot iterate all potential game objects and query the hasChanged() property for every ray.
Actually it seems that 4.6 adds an onParentChanged() callback. I hope that Unity takes this a step further and will also add the onTransformChanged() callback.