ARENA Migration Guide
As we update our software there are changes you may need to implement to keep your Python, Unity, and Web interfaces running smoothly.
Web 2.2.4 → 2.2.5 (Physics Update)
ARENA has migrated its physics engine from Ammo.js to PhysX. The older physics components (static-body, dynamic-body, and impulse) are deprecated and should be updated to their PhysX equivalents. Note: All new PhysX components require the scene to have physics enabled via scene-options: physics.
static-body and dynamic-body → physx-body
The older components have been unified into a single physx-body component.
Old Property (static-body / dynamic-body) |
New Property (physx-body) |
Notes / Considerations |
|---|---|---|
type (“static”, “dynamic”) |
type (“static”, “dynamic”, “kinematic”) |
dynamic-body becomes physx-body with type: dynamic (default). static-body becomes type: static. |
mass |
mass |
Default value changed: Old default was 5, new default is 1. |
linearDamping |
linearDamping |
Default value changed: Old default 0.01, new default 0. |
angularDamping |
angularDamping |
Default value changed: Old default 0.01, new default 0. |
shape |
(Removed) | PhysX automatically calculates collision shapes from the underlying geometry. This override is no longer supported on the body. |
cylinderAxis |
(Removed) | No longer supported. |
sphereRadius |
(Removed) | No longer supported. |
impulse → physx-force-pushable
The old impulse component forced you to calculate the force vectors manually. The new physx-force-pushable simplifies this for click interactions.
Old Property (impulse) |
New Property (physx-force-pushable) |
Notes / Considerations |
|---|---|---|
on |
on |
Behavior is identical (e.g. mousedown). |
force ({x,y,z}) |
force (Number) |
Simplified to a scalar multiplier. The push direction is automatically calculated from the user’s camera ray and click intersection point. |
position ({x,y,z}) |
(Removed) | The position of the impulse is now automatically determined by the 3D cursor’s intersection point on the object. |
collision-listener (PhysX and Payload Update)
The collision-listener component has been successfully migrated to use the new PhysX engine. To ensure it continues to work:
- Event Dependency: It now listens for PhysX
contactbegininstead of Ammo.jscollide. - Requirements: Ensure the colliding bodies have
emitCollisionEvents: trueset on theirphysx-bodycomponent for the events to fire. - Payload Changes: It still publishes
collisionevents to MQTT (to differentiate frombox-collision-listener), but aligns its positional metadata output with the newer payload format. The MQTT payload now correctly registers the user as theobject_idand the collided object as thetarget.
Web 1.29.0 → 2.0.0 (MQTT Topics, Client Events)
- MQTT Topics: We have refactored the MQTT topic structure which is now incompatible with older Unity and Python clients. The old authorization endpoints preceded with
arenaxr.org/user/...are now required to connect to ourarena-web-corev2 APIs atarenaxr.org/user/v2/.... You may see HTTP requests from Unity and Python fail with the HTTP status code 426: Upgrade Required. To resolve, use the Python upgrade or Unity upgrade instructions. -
Client Events: You’ll need to update your Unity and Python client applications to parse MQTT events messages from users with the new
clientEventfields, that are more logical now. Previously we usedsource, position, clickPos, with new fields named astarget, targetPosition, originPosition, respectively. Use the table below to migrate, wheremsgis the root payload JSON of the MQTTclientEventmessage payload:clientEventPropertyNew Web 2.0.0 Old Web 1.0.0 User Object msg.object_idmsg.data.sourceTarget Object msg.data.targetmsg.object_idOrigin Position msg.data.originPositionmsg.data.clickPosTarget Position msg.data.targetPositionmsg.data.position