← Home SEEBIE90 DOCS
Download PDF
The KRISS Vector mod is published under the Backblast Studios licenseExample code on this site is free to useBug reports: Backblast Studios DiscordLicense

KRISS Vector

Interaction points New

An interaction point is a context with a position, a radius and optionally a facing direction.

In plain wordsContexts can face a direction, so a point shows only from the side it belongs to. Foreign attachments put their actions in your weapon's default context.

Facing a direction

A context with Omnidirectional 0 and a VisibilityAngle is only visible from the side its PointInfo angles point to.

Example code – free to useweapon prefab
UserActionContext "{...}" {
 ContextName "my_rail_left"
 Position PointInfo "{...}" {
  PivotID "w_root"
  Offset -0.0265 0.0083 0.202
  Angles 0 -90 0		// pitch yaw roll: yaw +90 = visible from the right, -90 = from the left
 }
 Radius 0.02
 Omnidirectional 0
 VisibilityAngle 85		// half the opening angle of the cone
}

Test it, do not guess

UserActionContext.IsInVisibilityAngle(position) tells whether a position sees the context. A small probe that logs it for six directions (left, right, up, down, front, back, 0.5 m from the point) shows right away whether the signs are correct. The nearby display uses the same call with the camera position.

PitfallA cone around a sideways facing is exactly 90 degrees from a viewer behind or above the weapon. Looking steeply from above made both side points visible, and a narrower cone made the top rail unreachable. A point you rely on should not live on the edge of its cone. This is one reason the attach moved to a hub.

Foreign actions land in default

Attachments of other mods put their Attach and Detach actions into the context named default and their On/Off into their own user context, which sits on the device. So your weapon's default context is the collection point for everything foreign: the Attach and Detach lines you see there are not yours. You cannot move or hide them from the weapon – you can only decide where the point sits.

NoteDo not move the default context to hide it. It is also the point for picking the weapon up from the ground.

Item names

The vanilla attach and detach actions build their label as #AR-UserAction_Attach + the item name. A plain text item name then reads as one string ID: #AR-UserAction_AttachMy Rifle is shown raw. A leading space in the item name ends the key before the name starts.