Java3d 行为和运动
我想在一个简单的宇宙中以随机方向移动一个球体。 我如何通过逐帧少量改变位置来通过行为来实现这一目标。 我尝试这样做的原因是在宇宙中产生随机运动,并最终建立粒子之间的简单碰撞检测。
任何建议/链接将不胜感激
I would like to move a sphere in a random direction within a simple universe. How could i achieve this with behaviours by changing the location a small amount frame by frame. The reason I am trying to do this is to produce random movement within the universe and eventually build in simple collision detection between the particles.
Any advice/links would be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用此骨架添加一个扩展Behavior的新类:
稍后您需要实例化该类并将其添加到场景图中。 您还需要定义边界,否则什么也不会发生!
Add a new class that extends Behavior, using this skeleton:
You later need to instantiate the class and add it to the scene graph. You also need to defined the bounds, otherwise nothing will happen!