Merge pull request #1297 from N8n5h/patch-1
Add a function to find a rigidBody by their id
This commit is contained in:
commit
ab4fd65967
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue