Merge pull request #1297 from N8n5h/patch-1

Add a function to find a rigidBody by their id
This commit is contained in:
Lubos Lenco 2019-06-18 08:19:08 +02:00 committed by GitHub
commit ab4fd65967
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -225,6 +225,12 @@ class PhysicsWorld extends Trait {
}
return res;
}
public function findBody(id:Int):RigidBody{
if (rbMap.length == 0) return null;
var rb = rbMap.get(id);
return rb;
}
function lateUpdate() {
var t = Time.delta * timeScale;