Class MyCasterComponent
Component used for finding object by casting. It is possible to create this component with different types of casting:
Box, Raycast, Shape
Inheritance
System.Object
MyCasterComponent
Assembly: Sandbox.Game.dll
Syntax
public class MyCasterComponent : MyEntityComponentBase, IMyEntityComponentBase, IMyComponentBase
Constructors
MyCasterComponent(MyDrillSensorBase)
Declaration
public MyCasterComponent(MyDrillSensorBase caster)
Parameters
Type |
Name |
Description |
Sandbox.Game.Weapons.Guns.MyDrillSensorBase |
caster |
|
Properties
Caster
Declaration
public MyDrillSensorBase Caster { get; }
Property Value
Type |
Description |
Sandbox.Game.Weapons.Guns.MyDrillSensorBase |
|
ComponentTypeDebugString
Declaration
public override string ComponentTypeDebugString { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
DistanceToHitSq
Declaration
public double DistanceToHitSq { get; }
Property Value
Type |
Description |
System.Double |
|
EnvironmentItem
Declaration
public int EnvironmentItem { get; }
Property Value
Type |
Description |
System.Int32 |
|
HitBlock
Gets block that is hit by a raycaster.
Declaration
public MySlimBlock HitBlock { get; }
Property Value
Type |
Description |
Sandbox.Game.Entities.Cube.MySlimBlock |
|
HitCharacter
Declaration
public MyCharacter HitCharacter { get; }
Property Value
Type |
Description |
Sandbox.Game.Entities.Character.MyCharacter |
|
HitCubeGrid
Declaration
public MyCubeGrid HitCubeGrid { get; }
Property Value
HitDestroyableObj
Declaration
public IMyDestroyableObject HitDestroyableObj { get; }
Property Value
HitEnvironmentSector
Declaration
public MyEnvironmentSector HitEnvironmentSector { get; }
Property Value
HitFloatingObject
Declaration
public MyFloatingObject HitFloatingObject { get; }
Property Value
HitPosition
Declaration
public Vector3D HitPosition { get; }
Property Value
PointOfReference
Declaration
public Vector3D PointOfReference { get; }
Property Value
Methods
GetCastLength()
Declaration
public float GetCastLength()
Returns
Type |
Description |
System.Single |
|
Init(MyComponentDefinitionBase)
Declaration
public override void Init(MyComponentDefinitionBase definition)
Parameters
Overrides
OnAddedToContainer()
Declaration
public override void OnAddedToContainer()
Overrides
OnBeforeRemovedFromContainer()
Declaration
public override void OnBeforeRemovedFromContainer()
Overrides
OnWorldPosChanged(ref MatrixD)
Declaration
public void OnWorldPosChanged(ref MatrixD newTransform)
Parameters
Type |
Name |
Description |
MatrixD |
newTransform |
|
SetPointOfReference(Vector3D)
Declaration
public void SetPointOfReference(Vector3D pointOfRef)
Parameters
Type |
Name |
Description |
Vector3D |
pointOfRef |
|
Extension Methods