---
title: "remove(at:preservingWorldTransform:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/entity/childcollection/remove(at:preservingworldtransform:)"
---

# remove(at:preservingWorldTransform:)

Removes the specified child from this entity.

## Declaration

```swift
@MainActor @preconcurrency func remove(at index: Int, preservingWorldTransform: Bool = false)
```

## Parameters

- `index`: The index of the child entity to remove from the collection.
- `preservingWorldTransform`: true to preserve the world transform. false to preserve the relative transform. (Use true if the entities should keep its effective location and size in the scene!)

## Discussion

Discussion note: This may modify the order of the ChildCollection.

## See Also

### Removing entities

- [remove(_:preservingWorldTransform:)](realitykit/entity/childcollection/remove(_:preservingworldtransform:).md)
- [removeAll(preservingWorldTransforms:)](realitykit/entity/childcollection/removeall(preservingworldtransforms:).md)
- [removeAll(keepCapacity:preservingWorldTransforms:)](realitykit/entity/childcollection/removeall(keepcapacity:preservingworldtransforms:).md)
