LineTrace: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|LineTrace(sX, sY, sZ, eX, eY, eZ [, complex])}} {{FuncParameters}} {{FuncParam|sX|__EDIT_ME__}} {{..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Function|Client|1.0}} | {{Info|Function|Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Trace a line through the specified coordinates and return the hittype entity type, identifier and the impact coordinates.}} | ||
{{FuncSyntax|LineTrace(sX, sY, sZ, eX, eY, eZ [, complex])}} | {{FuncSyntax|LineTrace(sX, sY, sZ, eX, eY, eZ [, complex])}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|sX| | {{FuncParam|sX|The start X axis}} | ||
{{FuncParam|sY| | {{FuncParam|sY|The start Y axis}} | ||
{{FuncParam|sZ| | {{FuncParam|sZ|The start Z axis}} | ||
{{FuncParam|eX| | {{FuncParam|eX|The end X axis}} | ||
{{FuncParam|eY| | {{FuncParam|eY|The end Y axis}} | ||
{{FuncParam|eZ | | {{FuncParam|eZ |The end Z axis}} | ||
{{FuncParamOptional|complex|__EDIT_ME__}} | {{FuncParamOptional|complex|__EDIT_ME__}} | ||
Line 17: | Line 17: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
local hittype, hitid, impactX, impactY, impactZ = LineTrace(startX, startY, startZ, endX, endY, endZ, false) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:ClientFunctions}} |
Revision as of 15:44, 22 November 2019
Description
Trace a line through the specified coordinates and return the hittype entity type, identifier and the impact coordinates.
Syntax
LineTrace(sX, sY, sZ, eX, eY, eZ [, complex])
Parameters
- sX
The start X axis - sY
The start Y axis - sZ
The start Z axis - eX
The end X axis - eY
The end Y axis - eZ
The end Z axis - complex (optional)
__EDIT_ME__
Return Value
- __EDIT_ME__
Example
local hittype, hitid, impactX, impactY, impactZ = LineTrace(startX, startY, startZ, endX, endY, endZ, false)
See also
Pak
Game
- FlashInTaskbar
- IsGameWindowFocused
- SetStorageValue
- GetStorageValue
- GetGameLanguage
- GetGameVersion
- GetGameVersionString
- IsGameDevMode
- IsPlayerInMainMenu
- InvokeDamageFX
- UpdateDiscordActivity
- ConnectToServer
- SetNearClipPlane
- CreateSky
- GetAllPackages
- GetPackageFiles
- IsServer
- IsClient
- CopyToClipboard
Colors
Miscellaneous
- LineTrace
- createtable_ex
- GetCameraFoV
- SetCameraFoV
- Random
- RandomFloat
- Base64Encode
- Base64Decode
- GetDistance2D
- GetDistance3D
- GetDistanceSquared3D
- Lerp
- LerpVector
- VectorToRotation
- RotationToVector
- NormalizeVector
- IsFloatNearlyZero
- RandomUnitVectorInCone
- RandomUnitVectorInEllipticalCone
- UpdateStreamingLevels
Time
Player
- TogglePlayerTag
- SetPlayerVoiceTone
- GetPlayerActor
- GetPlayerSkeletalMeshComponent
- GetPlayerId
- SetPlayerPropertyValue
- GetPlayerPropertyValue
- SetPlayerRotationRate
- GetPlayerRotationRate
- SetPlayerJumpZVelocity
- GetPlayerJumpZVelocity
- GetPlayerWeapon
- GetWeaponType
- GetPlayerWeaponMuzzleLocation
- GetPlayerBoneNames
- GetAllPlayersInSphere
- GetAllPlayersInBox
- GetTerrainHeight
- EnableFirstPersonCamera
- IsFirstPersonCamera
- SetControllerOrientedMovement
- IsValidPlayer
- GetPlayerName
- GetStreamedPlayers
- GetPlayerLocation
- GetPlayerHeading
- IsPlayerTalking
- GetPlayerHealth
- GetPlayerArmor
- GetPlayerMovementMode
- GetPlayerMovementSpeed
- IsPlayerAiming
- IsPlayerReloading
- IsPlayerDead
- GetPlayerBoneLocation
- SetPlayerOutline
- SetPlayerClothingPreset
- GetPlayerVehicle
- IsPlayerInVehicle
- GetPlayerVehicleSeat
- GetPlayerEquippedWeaponSlot
- GetPlayerForwardVector
- GetPlayerRightVector
- GetPlayerUpVector
- GetVehicleActor
- SetPlayerLipMovement
- IsPlayerPlayingAnimation
- GetPlayerCount
- CancelAimImmediately
Camera
- StartCameraFade
- StopCameraFade
- PlayCameraShake
- StopCameraShake
- SetCameraShakeLocation
- SetCameraShakeRotation
- SetCameraShakeFOV
- GetScreenSize
- SetCameraLocation
- GetCameraLocation
- SetCameraRotation
- GetCameraRotation
- GetCameraForwardVector
- GetCameraRightVector
- GetCameraUpVector
- SetCameraViewDistance
- GetCameraViewDistance
Waypoints
- CreateWaypoint
- DestroyWaypoint
- SetWaypointText
- SetWaypointLocation
- GetWaypointLocation
- GetAllWaypoints
Fireworks
Packages
Chat
HUDs
Post-processing
GUI
- DrawText
- SetDrawColor
- SetTextDrawScale
- GetTextSize
- DrawLine
- DrawLine3D
- DrawPoint3D
- DrawCircle3D
- DrawBox
- DrawRect
- DrawTexture
- DrawTextureEx
- WorldToScreen
- ScreenToWorld
- CreateTextBox
- DestroyTextBox
- SetTextBoxAnchors
- SetTextBoxAlignment
- SetTextBoxText
Ocean
Mouse
- ShowMouseCursor
- GetMouseHitLocation
- GetMouseHitEntity
- IsMouseCursorEnabled
- SetMouseLocation
- GetMouseLocation
- GetMouseInputDelta
- DeprojectMouseLocationToWorld
Sky / Environment
- SetTime
- GetTime
- SetSkySaturation
- GetSkySaturation
- SetCloudSpeed
- GetCloudSpeed
- SetCloudDensity
- GetCloudDensity
- SetSunRadius
- GetSunRadius
- SetMoonRadius
- GetMoonRadius
- SetHeightFogDensity
- GetHeightFogDensity
Network
NPC
- IsValidNPC
- GetNPCActor
- SetNPCPropertyValue
- GetNPCPropertyValue
- GetNPCBoneNames
- GetNPCBoneLocation
- GetNPCCount
- GetStreamedNPC
- GetNPCLocation
- GetNPCSkeletalMeshComponent
- SetNPCOutline
Objects
- GetObjectActor
- SetObjectPropertyValue
- GetObjectPropertyValue
- GetObjectCount
- GetObjectModelCount
- GetObjectModelGroup
- GetObjectModelName
- GetStreamedObjects
- GetObjectModel
- GetObjectLocation
- GetObjectRotation
- GetObjectScale
- GetObjectBoundingBox
- GetObjectSize
- EnableObjectHitEvents
- GetObjectMass
- GetObjectStaticMeshComponent
- SetObjectEditorSpeed
- SetObjectEditable
- SetObjectOutline
- SetObjectCastShadow
- SetObjectColor
- SetObjectEmissiveColor
- SetObjectTexture
- SetObjectAnimatedTexture
Events
Pickup
- GetPickupActor
- GetPickupStaticMeshComponent
- SetPickupPropertyValue
- GetPickupPropertyValue
- GetPickupCount
- GetStreamedPickups
- GetPickupLocation
Door
- SetDoorPropertyValue
- GetDoorPropertyValue
- IsDoorInteractable
- IsDoorOpen
- GetDoorActor
- IsValidDoor
- GetDoorCount
- GetNearestDoor
- GetDoorLocation
- GetStreamedDoors
Text3D
Sound
- GetSoundCount
- IsValidSound
- CreateSound
- CreateSound3D
- SetSound3DLocation
- GetSound3DLocation
- DestroySound
- GetAllSounds
- SetSoundVolume
- GetSoundVolume
- SetSoundPitch
- GetSoundPitch
- SetSoundFadeIn
- SetSoundFadeOut
Text
Timer
- Delay
- GetTimerCount
- GetAllTimers
- IsValidTimer
- CreateTimer
- CreateCountTimer
- DestroyTimer
- PauseTimer
- UnpauseTimer
- GetTimerRemainingTime
Vehicles
- SetVehiclePropertyValue
- GetVehiclePropertyValue
- GetVehicleCount
- GetVehicleLicensePlate
- IsValidVehicle
- GetStreamedVehicles
- GetVehicleBoneLocation
- GetVehicleBoneNames
- GetVehicleModel
- GetVehicleLocation
- GetVehicleRotation
- GetVehicleVelocity
- GetVehicleForwardVector
- GetVehicleRightVector
- GetVehicleUpVector
- GetVehicleBoundingBox
- GetVehicleEngineRPM
- GetVehicleForwardSpeed
- GetVehicleGear
- GetVehicleWheelSurface
- IsVehicleWheelInAir
- IsVehicleInAir
- GetVehicleWheelSteerAngle
- IsVehicleHornActive
- GetVehicleEngineState
- GetVehicleLightState
- GetVehicleHoodRatio
- GetVehicleTrunkRatio
- IsVehicleInWater
- IsVehicleSeatOccupied
- GetVehicleDoorLocation
- GetVehicleHealth
- GetVehicleSkeletalMeshComponent
Web UI
- GetWebUICount
- CreateWebUI
- CreateWebUI3D
- CreateRemoteWebUI
- CreateRemoteWebUI3D
- DestroyWebUI
- GetAllWebUI
- SetWebVisibility
- GetWebVisibility
- SetWebURL
- LoadWebFile
- ExecuteWebJS
- SetWebLocation
- SetWebRotation
- SetWebSize
- SetWebAlignment
- SetWebAnchors
- SetWebFocus