Safety

aether-trust-safety

Runtime safety controls, personal space, and parental controls

The aether-trust-safety crate provides runtime safety controls for VR environments, including personal space bubbles, safety zones, visibility filtering, parental controls, block enforcement, and moderation tools for world owners.

Overview

VR safety requires protections beyond what traditional online platforms offer. Physical proximity in virtual space demands specific safeguards:

  • Personal space bubbles that push away avatars that get too close.
  • Safety zones where players can retreat to feel safe, with panic gesture support.
  • Visibility filtering that hides blocked users and enforces visibility scopes.
  • Parental controls with age gates, content filters, and time limits.
  • Block enforcement that prevents all interaction between blocked users.
  • Moderation tools for world owners to kick, mute, and manage participants.

Key Types

SafetySettings

Per-user safety configuration combining personal space, anonymous mode, and bubble settings.

use aether_trust_safety::{SafetySettings, PersonalSpaceBubble, AnonymousMode};

let settings = SafetySettings {
    bubble: PersonalSpaceBubble {
        radius: 0.5,
        enabled: true,
    },
    anonymous_mode: AnonymousMode::Off,
};

compute_pushes

Calculates push vectors for all nearby avatars that violate personal space boundaries.

use aether_trust_safety::{compute_pushes, PushResult, Vec3};

let pushes: Vec<PushResult> = compute_pushes(
    &my_position,
    &nearby_positions,
    bubble_radius,
);
for push in &pushes {
    // Apply push.displacement to the intruding avatar
}

SafeZone

Defines a region where enhanced safety protections apply.

use aether_trust_safety::{SafeZone, TeleportRequest};

let zone = SafeZone {
    center: Vec3 { x: 0.0, y: 0.0, z: 0.0 },
    radius: 5.0,
    mute_others: true,
    hide_others: true,
};

trigger_safety_teleport

Immediately teleports a player to the nearest safety zone when a panic gesture is detected.

use aether_trust_safety::{trigger_safety_teleport, is_panic_gesture, process_gesture};

if is_panic_gesture(&input_gesture) {
    let teleport = trigger_safety_teleport(player_position, &safety_zones);
}

ParentalControl

Enforces age-appropriate restrictions on content and session duration.

use aether_trust_safety::{ParentalControl, ContentFilter, TimeLimit, TimeLimitStatus};

let controls = ParentalControl {
    content_filter: ContentFilter::ChildSafe,
    time_limit: TimeLimit::Daily { minutes: 120 },
};
let status: TimeLimitStatus = check_time_remaining(&controls, session_start);

BlockList

Enforces bidirectional blocking between users.

use aether_trust_safety::{BlockList, is_mutually_blocked, filter_mutually_visible};

let visible = filter_mutually_visible(user_id, &all_nearby_users, &block_lists);
// Only returns users not blocked in either direction

WorldOwnerToolset

Moderation tools available to world owners and designated moderators.

use aether_trust_safety::{WorldOwnerToolset, ModerationTool, KickAction, MuteAction};

let tools = WorldOwnerToolset::new(world_owner_id);
tools.execute(ModerationTool::Kick(KickAction {
    target: offending_user,
    reason: "Harassment".into(),
    duration_minutes: Some(30),
}))?;

Visibility Filtering

use aether_trust_safety::{can_see, VisibilityMode, VisibleScope};

let visible = can_see(
    viewer_id,
    target_id,
    VisibilityMode::Normal,
    &block_list,
);

Usage Examples

Complete Safety Setup

use aether_trust_safety::{
    SafetySettings, PersonalSpaceBubble, ParentalControl,
    ContentFilter, TimeLimit, BlockList,
};

let settings = SafetySettings {
    bubble: PersonalSpaceBubble { radius: 0.8, enabled: true },
    anonymous_mode: AnonymousMode::Off,
};

let parental = ParentalControl {
    content_filter: ContentFilter::Teen,
    time_limit: TimeLimit::Daily { minutes: 180 },
};