球体中的物体(边界球体),希望它限制球体内的运动 [英] Object in sphere(bounding sphere), want it to restrict movement within sphere

查看:34
本文介绍了球体中的物体(边界球体),希望它限制球体内的运动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 2 个边界球,一个大一个小,小的会在大的里面移动,但我不想它跑到大的边界球外面,我该怎么做?

i have 2 bounding spheres, one big and one small , the small will be moving inside the big but i dont want it to go outside the big bounding sphere how do i do it?

我尝试了边界框和交集方法,但似乎不起作用.

I tried with the bounding box and the intersection method but it doesn't seem to work.

推荐答案

您是否有一些代码可供我们查看,以便我们确定它为什么不起作用?

Do you have some of your code that we can take a look at, so we can determine why it is not working?

否则这里有一些关于 BoundingSpheres 的信息:http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.boundingsphere_members.aspx

Otherwise here is some information on BoundingSpheres: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.boundingsphere_members.aspx

这篇关于球体中的物体(边界球体),希望它限制球体内的运动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆