MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnTransformChanged

Method OnTransformChanged

Source/Engine/Terrain/Terrain.cpp:901–924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

899}
900
901void Terrain::OnTransformChanged()
902{
903 // Base
904 Actor::OnTransformChanged();
905
906 for (int32 i = 0; i < _patches.Count(); i++)
907 {
908 auto patch = _patches[i];
909 patch->UpdateTransform();
910 }
911 if (_cachedScale != _transform.Scale)
912 {
913 _cachedScale = _transform.Scale;
914 for (int32 i = 0; i < _patches.Count(); i++)
915 {
916 auto patch = _patches[i];
917 if (patch->HasCollision())
918 {
919 patch->UpdateCollisionScale();
920 }
921 }
922 }
923 UpdateBounds();
924}
925
926void Terrain::OnLayerChanged()
927{

Callers

nothing calls this directly

Calls 3

UpdateCollisionScaleMethod · 0.80
CountMethod · 0.45
UpdateTransformMethod · 0.45

Tested by

no test coverage detected