Skip to main content

EmbeddableRaycastProjectile

A class in Root.Township, the global namespace.

Links a RaycastProjectile to an Embeddable, so a raycast hit makes the projectile embed where it hit.

Constructors​

MemberWhat it is
EmbeddableRaycastProjectile()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private Embeddable embeddableThe embeddable that sticks into the hit.
private RaycastProjectile raycastProjectileThe projectile whose hits are forwarded.

Methods​

2 private and internal methods
MemberWhat it is
private void GenerateHitForEmbeddable(RaycastHit hit)Passes the hit collider, point and normal to the embeddable as an external collision.
private void Start()Subscribes to the projectile's collided event.