# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/sample-tutorial-03-flexible-gameplay-in-fortnite
# Local doc: epic-docs/documentation/en-us/fortnite/sample-tutorial-03-flexible-gameplay-in-fortnite.md
# Section: Perform the sweep from the UFO Mesh
# Perform the sweep from the UFO Mesh
if (Child := Entity.GetEntities()[0]):
DisplacementVector := vector3{Left:=0.0, Up:=-300.0, Forward:=0.0}
FirstSweepHitEntity := FindFirstSweepHit(Child, DisplacementVector)
# If the First Hit Entity is the Cow Mesh, then abduct the Cow
if (HitEntity := FirstSweepHitEntity?; HitEntity.GetComponent[Meshes.SM_Toy_Cow]):
spawn { AbductCow(HitEntity) }
Verse Library
verse
22 Perform The Sweep From The Ufo Mesh
Detects a specific mesh via raycast sweep and triggers a custom abduction sequence.
extracted-snippets/documentation/en-us/fortnite/sample-tutorial-03-flexible-gameplay-in-fortnite/22-perform-the-sweep-from-the-ufo-mesh.verse