Thanks for your reply, Sergey. I will try it.
BTW, sometimes, I want to detect the intersection between the camera frustum 
and the terrain. So,is there any way to detect the intersection between a 
bounding sphere(or box) and the terrain in OSG? 


Cheers
yaoyansi



________________________________
 发件人: Sergey Polischuk <pol...@yandex.ru>
收件人: OpenSceneGraph Users <osg-users@lists.openscenegraph.org> 
发送日期: 2013年1月14日, 星期一, 4:34 下午
主题: Re: [osg-users] how to keep the camera from being below the terrain?
 

Hi
 
there is no collision detection in osg. You can use intersectors in osgUtil and 
trace rays from camera downwards to check distance from ground, or use some 
physics engine to get proper collision detection.
 
Cheers.
 
13.01.2013, 20:51, "Yansi Yao" <yaoyans...@yahoo.com.cn>:

>Hi all,
>I'm going to attach a bounding box or bounding sphere to the camera, and 
>detect the collision between the terrain and the bounding object. But I don't 
>know how to detect this collision in osg. Could you tell me how to do this? or 
>is there any demo for this problem?
>
>Cheers
>yaoyansi  ,
>_______________________________________________
>osg-users mailing list
>osg-users@lists.openscenegraph.org
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to