Looks like you’re doing it right (not that I would know). I can’t see these physics API references anywhere in the API reference docs, however, looking at the source using Developer Tools, we see the functions below. The code is obfuscated to cut down filesize, and the resulting function for addToPhysics just has lots of math, so not terribly useful.
p.shiftPhysicsPosition = function(a, c, d) {
o.zB(a, c, d)
}
;
p.setPhysicsPosition = function(a, c, d) {
o.rB(a, c, d)
}
;
p.shiftPhysicsPositionLocal = function(a, c, d) {
o.AB(a, c, d)
}
;
p.setPhysicsGroupPosition = function(a, c, d) {
o.qB(a, c, d)
}
;
p.shiftPhysicsGroupPositionLocal = function(a, c, d) {
o.yB(a, c, d)
}
;
p.getPhysicsPosition = function() {
return o.zA()
}
;
p.getPhysicsGroupPosition = function() {
return o.yA()
}
;
p.rotatePhysicsBodyLocal = function(a, c, d, e) {
o.VA(a, c, d, e)
}
;
p.setPhysicsPositionCorrection = function(a, c, d) {
o.sB(a, c, d)
}
;
p.removePhysicsBody = function() {
o.RA()
}
;
p.removePhysicsGroup = function() {
o.SA()
}
;
p.removeFromPhysicsGroup = function() {
o.QA()
}
;
p.addToPhysics = function() {
o.fA()
}
;
p.setModelPreciseCollision = function(a) {
o.nB(a)
}
;
p.addToPhysicsCollisionFilter = function(a) {
o.gA(a.ref)
}
;
p.removeFromPhysicsCollisionFilter = function(a) {
o.PA(a.ref)
}
;
p.convertToLocalVector = function(a, c, d) {
return o.mA(a, c, d)
}
;
p.setVelocity = function(a, c, d) {
o.wB(a, c, d)
}
;
p.setMass = function(a) {
o.jB(a)
}
;
p.setModelMass = function(a) {
o.mB(a)
}
;
p.setModelDensity = function(a) {
o.kB(a)
}
;
p.setGroupMass = function(a) {
o.fB(a)
}
;
p.setVelocityLocal = function(a, c, d) {
o.xB(a, c, d)
}
;
p.setGroupVelocityLocal = function(a, c, d) {
o.hB(a, c, d)
}
;
p.getVelocity = function() {
return o.AA()
}
;
p.getVelocityLocal = function() {
return o.BA()
}
;
p.getGroupVelocityLocal = function() {
return o.vA()
}
;
p.getAngularVelocity = function() {
return o.rA()
}
;
p.getAngularVelocityLocal = function() {
return o.sA()
}
;
p.getGroupAngularVelocityLocal = function() {
return o.uA()
}
;
p.setAngularVelocity = function(a, c, d) {
o.XA(a, c, d)
}
;
p.setAngularVelocityLocal = function(a, c, d) {
o.YA(a, c, d)
}
;
p.setGroupAngularVelocityLocal = function(a, c, d) {
o.aB(a, c, d)
}
;
p.setDensity = function(a) {
o.ZA(a)
}
;
p.setGroupDensity = function(a) {
o.bB(a)
}
;
p.setRestitution = function(a) {
o.tB(a)
}
;
p.setModelRestitution = function(a) {
o.oB(a)
}
;
p.setGroupRestitution = function(a) {
o.gB(a)
}
;
p.setFriction = function(a) {
o._A(a)
}
;
p.setModelFriction = function(a) {
o.lB(a)
}
;
p.setGroupFriction = function(a) {
o.dB(a)
}
;
p.distanceConstraint = function(a, c, d, e, f, g, h, i) {
return o.pA(a.ref, c, d, e, f, g, h, i)
}
;
p.attractorConstraint = function(a, c, d) {
return o.kA(a.ref, c, d)
}
;
p.positionConstraint = function(a, c, d) {
return o.NA(a, c, d)
}
;
p.rotationConstraint = function(a, c, d, e) {
return o.WA(a, c, d, e)
}
;
p.planeConstraint = function(a, c, d) {
return o.MA(a, c, d)
}
;
p.sliderConstraint = function(a, c, d) {
return o.BB(a, c, d)
}
;
p.curveHandlerConstraint = function(a, c, d) {
return o.oA(a, c, d)
}
;
p.curveConstraint = function(a, c, d) {
return o.nA(a.ref, c, d)
}
;
p.gearConstraint = function(a, c, d, e, f, g, h, i) {
return o.qA(a.ref, c, d, e, f, g, h, i)
}
;
p.jointToItem = function(a, c, d, e) {
return o.HA(a.ref, c, d, e)
}
;
p.jointToGround = function(a, c, d) {
return o.GA(a, c, d)
}
;
p.hingeJointToItem = function(a, c, d, e, f, g, h, i, j, k, l, m, n) {
return o.DA(a.ref, c, d, e, f, g, h, i, j, k, l, m, n)
}
;
p.motorJointToItem = function(a, c, d, e, f, g, h, i, j, k, l, m, n) {
return o.IA(a.ref, c, d, e, f, g, h, i, j, k, l, m, n)
}
;
p.removeFromConstraints = function() {
o.OA()
}
;
p.applyImpulse = function(a, c, d, e, f, g) {
o.iA(a, c, d, e, f, g)
}
;
p.applyImpulseLocal = function(a, c, d, e, f, g) {
o.jA(a, c, d, e, f, g)
}
;
p.applyForce = function(a, c, d) {
o.hA(a, c, d)
}
;
p.setForce = function(a, c, d) {
o.$A(a, c, d)
}
;
p.setGroupForce = function(a, c, d) {
o.cB(a, c, d)
}
;
p.setLayer = function(a) {
o.iB(a)
}
;
p.setGroupLayer = function(a) {
o.eB(a)
}
;
p.setStatic = function(a) {
typeof a == Jlo ? o.vB(a) : o.uB()
}
;
p.setModelStatic = function(a) {
o.pB(a)
}
;
p.isStatic = function() {
return o.FA()
}
;
p.onPhysicsCollisionEnter = function(a) {
return o.KA(a)
}
;
p.onPhysicsCollisionExit = function(a) {
return o.LA(a)
}
;
p.onPhysicsCollision = function(a, c) {
return o.JA(a, c)
}
;
p.clearCollisionHandlers = function() {
return o.lA()
}
;
p.getMass = function() {
return o.wA()
}
;
p.getDensity = function() {
return o.tA()
}
;
p.getModelMass = function() {
return o.xA()
}
;
p.isInGroup = function() {
return o.EA()
}
;
p.hasPhysicsBody = function() {
return o.CA()
}
;
p.restrictMovementAxis = function(a, c, d) {
o.TA(a, c, d)
}
;
p.restrictRotationAxis = function(a, c, d) {
o.UA(a, c, d)
}