如何将 XNA 中的摄像机放置在 10 个单位之外但不在后面?
例如,我希望相机距离物体 10 个单位,但不在物体后面。
但不是这样,因为相机总是在物体后面:
cameraPosition = objectPosition + object.Backwards * 10;
I want the camera to be for example 10 units away from an object, but not behind it.
But not like this, because the camera always will be behind the object:
cameraPosition = objectPosition + object.Backwards * 10;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,将其定位得稍微靠上一些看起来会更好,例如:
这会将相机放置在物体的后面和上方。并且它可以看过去的物体,这对于跟踪汽车的相机来说是有好处的。
这里的调整是有限的,你甚至可以使用输入来修改它。
Often it looks better for it to be located up a little also, for example:
This places the camera behind and above the object. And has it kind of looking past the object which is good for a camera following a car.
The sky is the limit on adjustments here, you can even use input to modify it some.