Sphere Cast

Physics
दोनों तरफ
क्राफ्टलैंड स्टूडियो मोबाइल और पीसी दोनों पर उपलब्ध है

Use a spherical area with linear motion for detection, and return all entities encountered on the route of the spherical area from near to far. If they are initially in the spherical area, they will not be detected; if the level parameter is filled in, the terrain can be detected

डिक्लेरेशन

func SphereCast(radius float, center Vector3, direction Vector3, maxDistance float, layerMask List<int>, includeTrigger bool, out var hitEntities List<entity<Entity>>)
go

पैरामीटर्स

इनपुट

नाम टाइप विवरण
Radius Float Spherical region radius, only positive values are accepted
Center Vector3 Center point of spherical area
Direction Vector3 Spherical area travel direction
Max. Distance Float Spherical area travel distance, only positive values are accepted
Layer Mask ListT_int Layer mask, only the filled layers will participate in the scan, leaving it blank means all layers will participate in the scan
Include Trigger Bool Whether the trigger can be detected

आउट

नाम टाइप विवरण
Hit Entities ListT_Entity List of entities hit