Skip to content

Commit ffab290

Browse files
chore: fix merge conflicts from dev
* 'dev' of github.com:Autodesk/synthesis: chore: fix ci refactor: create useHoldPhysicsPause hook fix: update stale comment fix: restore previously removed cast fix: mock real jolt vec object in unit test fix: revert auto formatting change fix: asan build jolt memory bug catches
2 parents bec58b1 + 8b32254 commit ffab290

19 files changed

Lines changed: 249 additions & 141 deletions

fission/src/systems/multiplayer/MessageHandlers.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,17 @@ function handlePeerUpdate(data: UpdateObjectData[], peerId: string, timestamp: n
133133
const clientBody = World.physicsSystem.getBody(bodyId)
134134
if (!clientBody) {
135135
console.error(`Body ${bodyId} on Scene Object ${sceneObject.assemblyName} not found`)
136+
JOLT.destroy(linearVelocity)
137+
JOLT.destroy(angularVelocity)
138+
JOLT.destroy(position)
139+
JOLT.destroy(rotation)
136140
return
137141
}
138142

139143
clientBody.SetLinearVelocity(linearVelocity)
140144
clientBody.SetAngularVelocity(angularVelocity)
145+
JOLT.destroy(linearVelocity)
146+
JOLT.destroy(angularVelocity)
141147
World.physicsSystem.setBodyPosition(bodyId, position)
142148
World.physicsSystem.setBodyRotation(bodyId, rotation)
143149
})

fission/src/systems/physics/ConstraintSettingsUtilities.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { convertMirabufVector3ToJoltRVec3, convertMirabufVector3ToJoltVec3 } fro
66

77
type LimitSpecs = Omit<DOFSpecs, "friction" | "axis">
88

9+
// Returns a STATIC_ALIAS `RVec3.AddRVec3()`'s scratch buffer.
910
export function createAnchorPoint(jointInstance: mirabuf.joint.JointInstance, jointDefinition: mirabuf.joint.Joint) {
1011
const jointOrigin = jointDefinition.origin
1112
? convertMirabufVector3ToJoltRVec3(jointDefinition.origin)

fission/src/systems/physics/Mechanism.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Mechanism {
2020
public nodeToBody: Map<RigidNodeId, Jolt.BodyID>
2121
public constraints: MechanismConstraint[] = []
2222
public stepListeners: Jolt.PhysicsStepListener[] = []
23+
public vehicleTesters: Jolt.VehicleCollisionTester[] = []
2324
public layerReserve?: LayerReserve
2425
public controllable: boolean
2526
public ghostBodies: Jolt.BodyID[] = []
@@ -45,6 +46,10 @@ class Mechanism {
4546
this.stepListeners.push(listener)
4647
}
4748

49+
public addVehicleTester(tester: Jolt.VehicleCollisionTester) {
50+
this.vehicleTesters.push(tester)
51+
}
52+
4853
public getBodyByNodeId(nodeId: string) {
4954
return this.nodeToBody.get(nodeId)
5055
}

0 commit comments

Comments
 (0)