Skip to content

Commit

Permalink
Merge pull request cocos2d#14469 from super626/terrain
Browse files Browse the repository at this point in the history
fix bug: Terrain::getIntersectionPoint when there is offset
  • Loading branch information
super626 committed Nov 25, 2015
2 parents 3cc3325 + 1ac82fa commit 4ba6279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cocos/3d/CCTerrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ bool Terrain::getIntersectionPoint(const Ray & ray_, Vec3 & intersectionPoint) c
getWorldToNodeTransform().transformPoint(&(ray._origin));

std::set<Chunk *> closeList;
Vec2 start = Vec2(ray._origin.x,ray._origin.z);
Vec2 start = Vec2(ray_._origin.x,ray_._origin.z);
Vec2 dir = Vec2(ray._direction.x,ray._direction.z);
start = convertToTerrainSpace(start);
start.x /=(_terrainData._chunkSize.width+1);
Expand Down

0 comments on commit 4ba6279

Please sign in to comment.