MTion
Control MTion VTuber avatar motion tracking with full support for animations, expressions, tracking control, and scene management.
Overview
MTion is a VTuber/avatar motion tracking platform that enables real-time avatar animation using face and body tracking. FaustBot integrates with MTion to provide:
Animation Control
Play and stop avatar animations on demand.
Expression Triggering
Set facial expressions with adjustable intensity.
Motion Tracking
Enable, disable, and calibrate tracking.
Avatar Control
Show/hide avatar and reset pose.
Scene Management
Load different scenes and environments.
State Monitoring
Get current avatar and tracking state.
Setup
Configure MTion Connection
FaustBot connects to MTion using its API. Ensure MTion is running and the API server is enabled before connecting.
Enable MTion API
In MTion, go to Settings → API and enable the API server. Note the port number (default is usually 8080).
Configure FaustBot
In FaustBot, navigate to Integrations → MTion. Enter the
host (usually localhost) and port from MTion.
Connect
Click Connect to establish the connection. The status indicator will turn green when connected successfully.
Auto-Connect
Enable Auto-Connect to automatically connect when FaustBot starts. Make sure MTion is already running before launching FaustBot.
Effects
Animation Control
Play Animation
Trigger a specific avatar animation.
Stop Animation
Stop the currently playing animation.
Expression Control
Set Expression
Set a facial expression with intensity.
Clear Expression
Remove the current expression.
Tracking Control
Enable Tracking
Turn on motion tracking.
Disable Tracking
Turn off motion tracking.
Calibrate Tracking
Recalibrate the tracking system.
Avatar Control
Show Avatar
Make the avatar visible.
Hide Avatar
Make the avatar invisible.
Reset Pose
Reset avatar to default pose.
Load Scene
Switch to a different scene.
Scripting API
Control MTion from your scripts using the CPH API:
Animation Control
# Play an animation
CPH.MTionPlayAnimation("wave")
# Stop current animation
CPH.MTionStopAnimation()
# Get available animations
animations = CPH.MTionGetAvailableAnimations()
for anim in animations:
CPH.Log(f"Animation: {anim}")Expression Control
# Set an expression with intensity (0.0 to 1.0)
CPH.MTionSetExpression("happy", 0.8)
CPH.MTionSetExpression("surprised", 1.0)
# Clear current expression
CPH.MTionClearExpression()
# Get available expressions
expressions = CPH.MTionGetAvailableExpressions()
for expr in expressions:
CPH.Log(f"Expression: {expr}")Motion Tracking
# Enable/disable tracking
CPH.MTionSetTrackingEnabled(True)
CPH.MTionSetTrackingEnabled(False)
# Calibrate tracking
CPH.MTionCalibrateTracking()
# Get tracking status
status = CPH.MTionGetTrackingStatus()
CPH.Log(f"Tracking enabled: {status['enabled']}")Avatar Control
# Show/hide avatar
CPH.MTionSetAvatarVisible(True)
CPH.MTionSetAvatarVisible(False)
# Reset avatar pose
CPH.MTionResetAvatarPose()
# Load a scene
CPH.MTionLoadScene("Studio")
# Get available scenes
scenes = CPH.MTionGetAvailableScenes()
# Get current state
state = CPH.MTionGetCurrentState()Connection Methods
You can also manage the MTion connection programmatically using CPH.MTionConnect(), CPH.MTionDisconnect(), CPH.MTionIsConnected(), and CPH.MTionGetConnectionInfo().
See the full API reference for all available MTion methods.