UxrImpactDecal.CheckCreateDecal Method

Checks if a given impact should generate a decal, and creates it if necessary.

Namespace: UltimateXR.Mechanics.Weapons
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static UxrImpactDecal CheckCreateDecal(
	RaycastHit raycastHit,
	LayerMask checkLayerMask,
	UxrImpactDecal prefabDecal,
	float lifeTime,
	float fadeOutDurationSeconds,
	bool createDoubleSidedDecal = false,
	float doubleSidedDecalThickness = 0.001f
)

Parameters

 

raycastHit
Type: RaycastHit
Impact raycast hit
checkLayerMask
Type: LayerMask
Layer mask that should generate a decal
prefabDecal
Type: UltimateXR.Mechanics.Weapons.UxrImpactDecal
The decal prefab to use when if the decal should be generated
lifeTime
Type: System.Single
New decal life time, after which it will fade out and be destroyed
fadeOutDurationSeconds
Type: System.Single
Decal fade out duration in seconds
createDoubleSidedDecal (Optional)
Type: System.Boolean
Whether to also generate a secondary decal for the other side of the impact
doubleSidedDecalThickness (Optional)
Type: System.Single
Surface thickness to consider when generating the secondary decal for the other side

Return Value

Type: UxrImpactDecal
New decal or null if no decal was generated

See Also

Reference

UxrImpactDecal Class
UltimateXR.Mechanics.Weapons Namespace