How to spawn an entity in zero gravity with RealityKit?

I'm creating a RealityKit game that requires an object to be spawned in midair, fired in a certain direction using an impulse, and then bounce around the cubic container that surrounds it without any other forces being applied to it. Think the DVD logo screensaver but in 3D.

However when I spawn the object in with this code, it falls straight down due to a force of gravity being applied.

// Create the object entity
let object = ModelEntity(mesh: MeshResource.generateBox(size: [0.07, 0.01, 0.14]), materials: [SimpleMaterial(color: .white, isMetallic: false)])

// Define object shape
let objectShape = [ShapeResource.generateBox(size: [0.07, 0.01, 0.14]]

// Create the object PhysicsBody
var objectPhysicsBody = PhysicsBodyComponent(shapes: objectShape, mass: 1, material: .default, mode: .dynamic)

// Create the object CollisionComponent
let objectCollision = CollisionComponent(shapes: objectShape)

// Set components to the object
object.components.set(objectPhysicsBody)
object.components.set(objectCollision)

// Attach the object to the anchor
anchor.addChild(object)

I've tried applying a constant a negating force upwards (quite messy and didn't work), and also changing the mode to kinematic and manually handling the collisions with the container (same again).

However if I could remove the gravitational force from the object then the game would function as intended, but I've not been able to find any solutions or documentation. My project has been stuck here for some time now and I really don't know how to resolve this.

If anybody has any suggestions or insights I'd be extremely grateful. Cheers.

How to spawn an entity in zero gravity with RealityKit?
 
 
Q