npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rbxts/cmove-wrapper

v1.0.0

Published

A sophisticated Roblox camera controller with smooth movement, rotation tracking, and intelligent occlusion detection. Features configurable smoothing, multiple tracking modes (lock/follow), and automatic obstacle avoidance with customizable reactions.

Readme

@rbxts/cmove-wrapper

Documentation

Roblox-ts library for sophisticated camera control with smooth movement, rotation tracking, and intelligent occlusion detection. Control camera position and rotation with configurable smoothing, multiple tracking modes, and automatic obstacle avoidance with customizable reactions.

Features

  • Smooth camera movement with exponential interpolation (PositionSmoothing, RotationSmoothing).
  • Flexible targeting: lock to positions/CFrames, follow BaseParts, or maintain distance with FollowPosition.
  • Dual tracking modes: Lock (precise targeting) and Follow (radius-based following).
  • Occlusion detection: raycast-based obstacle detection with immediate and debounced (250ms) state tracking.
  • Occlusion reactions: None, Passthrough (move through obstacles), or Avoid (shift sideways).
  • Signals: MoveTargetOcclusionChanged, LookTargetOcclusionChanged, and deferred variants for debounced events.
  • Configurable raycast parameters: filter descendants, ignore water, respect CanCollide.
  • Optional filter callback for custom position/rotation processing each frame.

Documentation

Full API documentation: https://irishfix.github.io/rbxts-cmove-wrapper/

Installation

npm install @rbxts/cmove-wrapper

Quick start

import { CMover, CMoveWrapper, ActiveMode, OcclusionReaction } from "@rbxts/cmove-wrapper";

// Create a CMover for the workspace camera with occlusion checking enabled
const camera = Workspace.CurrentCamera!;
const mover = new CMover(camera, true);

// Configure smoothing (lower = snappier, higher = smoother)
mover.PositionSmoothing = 0.3;
mover.RotationSmoothing = 0.2;

// Set up occlusion reaction
mover.OcclusionReaction = OcclusionReaction.Avoid;
mover.OcclusionCheckActive = true;

// Move camera to a position and look at a target
const targetPart = Workspace.WaitForChild("Target") as BasePart;
mover.MoveToPosition(new Vector3(0, 50, 0));
mover.LookAt(targetPart);

// Subscribe to occlusion events
mover.MoveTargetOcclusionChanged.Connect((current, previous) => {
	print(`Move target occlusion changed: ${previous} -> ${current}`);
});

// Activate the camera system
mover.Active = true;

// Or use the wrapper with a filter callback to constrain camera height
const player = Players.LocalPlayer;
let currentHRP: BasePart | undefined;

const wrappedMover = CMoveWrapper.Wrap(camera, true, (newPosition: Vector3, newRotation: CFrame) => {
	if (currentHRP) {
		// Keep camera at least 5 studs above the character
		const filteredPosition = new Vector3(
			newPosition.X,
			math.max(currentHRP.Position.Y + 5, newPosition.Y),
			newPosition.Z
		);
		return [filteredPosition, newRotation] as LuaTuple<[Vector3, CFrame]>;
	}
	return [newPosition, newRotation] as LuaTuple<[Vector3, CFrame]>;
});

player.CharacterAdded.Connect((character) => {
	const hrp = character.WaitForChild("HumanoidRootPart") as BasePart;
	const head = character.WaitForChild("Head") as BasePart;
	currentHRP = hrp;
	
	wrappedMover.FollowPosition(hrp, 20); // Follow within 20 studs
	wrappedMover.LookAt(head);
	wrappedMover.SetOcclusionCheckIgnore(OcclusionIgnoreTarget.All, [character], true);
	wrappedMover.Active = true;
	wrappedMover.OcclusionCheckActive = true;
});

API hints

  • Creation: new CMover(camera, occlusionChecking?, filterCallback?) or CMoveWrapper.Wrap(camera, ...).
  • Movement: MoveTo(cframe), MoveToPosition(vector3), MoveWith(part), FollowPosition(part, maxDistance).
  • Rotation: LookAt(target), or set via MoveTo / MoveWith for combined control.
  • Modes: PositionMode / RotationMode (set to ActiveMode.Lock or ActiveMode.Follow).
  • Smoothing: PositionSmoothing / RotationSmoothing (time constants in seconds, 0 = instant).
  • Occlusion: SetOcclusionCheckIgnore(target, filterDescendants, ignoreWater?, prioritiseCanCollide?).
  • Control: Active (enable/disable updates), OcclusionCheckActive (enable/disable occlusion detection).
  • Cleanup: Destroy() to unbind from RenderStep and disconnect all connections.