Screen Single Raycast

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

Perform ray detection through screen touch and return the first entity hit

डिक्लेरेशन

func ScreenSingleRaycast(startPosition Vector2, distance float, layerMask List<int>, includeTrigger bool, out var hitEntity entity<Entity>, out var hitPosition Vector3, out var hitDistance float, out var hitNormal Vector3)
go

पैरामीटर्स

इनपुट

नाम टाइप विवरण
Start Position Vector2 Start screen touch point
Distance Float Detection distance
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 Entity Entity Entity hit
Hit Position Vector3 Hit point coordinate
Hit Distance Float Distance from hit point to start point
Hit Normal Vector3 Hit Surface Normal