Quantcast
Channel: Cocos中文社区 - 最新帖子
Viewing all articles
Browse latest Browse all 495378

testPoint一直返回null

$
0
0
    cc.PhysicsAABBQueryCallback.prototype.ReportFixture = function (fixture) {
        var body = fixture.GetBody();
        if (this._isPoint) {
            if (fixture.TestPoint(this._point)) {
                this._fixtures.push(fixture);
                // We are done, terminate the query.
                return false;
            }
        }
        else {
            this._fixtures.push(fixture);
        }
        // True to continue the query, false to terminate the query.
        return true;
    };

找个地方执行下就可以了

源码判断了刚体是不是dynamic


Viewing all articles
Browse latest Browse all 495378

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>