Class SightLine
Represents a line that can do raytracing operations
Implements
Inherited Members
Namespace: Slipe.Client.SightLines
Assembly: SlipeClient.dll
Syntax
public class SightLine : Dx3DLine, IDrawable
Constructors
| Improve this Doc View SourceSightLine(PhysicalElement, Vector3, Matrix4x4, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, PhysicalElement)
Create a SightLine attached to a certain object
Declaration
public SightLine(PhysicalElement attachedTo, Vector3 relativeEndPos, Matrix4x4 offset, bool checkBuildings = true, bool checkVehicles = true, bool checkPeds = true, bool checkWorldObjects = true, bool seeThroughStuff = false, bool ignoreSomeObjectsForCamera = false, bool shootThroughStuff = false, bool includeWorldModelInformation = false, bool includeCarTyreHits = true, PhysicalElement ignoredElement = null)
Parameters
| Type | Name | Description |
|---|---|---|
| PhysicalElement | attachedTo | |
| Vector3 | relativeEndPos | |
| Matrix4x4 | offset | |
| Boolean | checkBuildings | |
| Boolean | checkVehicles | |
| Boolean | checkPeds | |
| Boolean | checkWorldObjects | |
| Boolean | seeThroughStuff | |
| Boolean | ignoreSomeObjectsForCamera | |
| Boolean | shootThroughStuff | |
| Boolean | includeWorldModelInformation | |
| Boolean | includeCarTyreHits | |
| PhysicalElement | ignoredElement |
SightLine(Vector3, Vector3, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, PhysicalElement)
Creates a SightLine from a start and an end position
Declaration
public SightLine(Vector3 startPos, Vector3 endPos, bool checkBuildings = true, bool checkVehicles = true, bool checkPeds = true, bool checkWorldObjects = true, bool seeThroughStuff = false, bool ignoreSomeObjectsForCamera = false, bool shootThroughStuff = false, bool includeWorldModelInformation = false, bool includeCarTyreHits = true, PhysicalElement ignoredElement = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | startPos | |
| Vector3 | endPos | |
| Boolean | checkBuildings | |
| Boolean | checkVehicles | |
| Boolean | checkPeds | |
| Boolean | checkWorldObjects | |
| Boolean | seeThroughStuff | |
| Boolean | ignoreSomeObjectsForCamera | |
| Boolean | shootThroughStuff | |
| Boolean | includeWorldModelInformation | |
| Boolean | includeCarTyreHits | |
| PhysicalElement | ignoredElement |
Properties
| Improve this Doc View SourceCheckBuildings
Allow the line of sight to be blocked by GTA's internally placed buildings, i.e. the world map.
Declaration
public bool CheckBuildings { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
CheckPeds
Allow the line of sight to be blocked by peds, i.e. players.
Declaration
public bool CheckPeds { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
CheckVehicles
Allow the line of sight to be blocked by vehicles.
Declaration
public bool CheckVehicles { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
CheckWorldObjects
Allow the line of sight to be blocked by WorldObjects.
Declaration
public bool CheckWorldObjects { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Data
Get a SightLineData object for the current line of sight
Declaration
public SightLineData Data { get; }
Property Value
| Type | Description |
|---|---|
| SightLineData |
Debug
Get and set if this sightline should be drawn (use for debug)
Declaration
public bool Debug { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
IgnoredElement
Allow the line of sight to pass through a certain specified element.
Declaration
public PhysicalElement IgnoredElement { get; set; }
Property Value
| Type | Description |
|---|---|
| PhysicalElement |
IgnoreSomeObjectsForCamera
Allow the line of sight to pass through objects that have (K) property enabled in "object.dat" data file. (i.e. Most dynamic objects like boxes or barrels)
Declaration
public bool IgnoreSomeObjectsForCamera { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
IncludeCarTyreHits
Includes car tyre hits.
Declaration
public bool IncludeCarTyreHits { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
IncludeWorldModelInformation
Include the results of hitting a world model.
Declaration
public bool IncludeWorldModelInformation { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
IsClear
Checks if there are obstacles between two points of the game world, optionally ignoring certain kinds of elements
Declaration
public bool IsClear { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
SeeThroughStuff
Allow the line of sight to be blocked by translucent game objects, e.g. glass.
Declaration
public bool SeeThroughStuff { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
ShootThroughStuff
Allow the line of sight to be blocked by things that can be shot through. (Not used in IsClear!)
Declaration
public bool ShootThroughStuff { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
WaterCollisionPosition
Test if the SightLine hits water. Throws an exception when no water is hit
Declaration
public Vector3 WaterCollisionPosition { get; }
Property Value
| Type | Description |
|---|---|
| Vector3 |