ios - 有没有办法根据其父 SCNView 的框架来缩放 SCNNode?

标签 ios objective-c scenekit

我正在使用 ObjC 语言在 Scenekit 项目上使用 collada 文件加载 3D 模型。我想实现 3d 模型的动态缩放,即 SCNNode 就像 AutoLayout 适用于任何对其施加约束的 UIControl

我希望将 SCNNode 缩放为其父 SCNView 的缩放因子,而不裁剪 3D 模型的任何部分。

如果可能的话我该如何实现同样的目标?

最佳答案

自动执行此操作并不方便。 您必须根据其视野和物体的尺寸来放置相机。

参见How to calculate the z-distance of a camera to view an image at 100% of its original scale in a 3D space

关于ios - 有没有办法根据其父 SCNView 的框架来缩放 SCNNode?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28792771/

相关文章:

ios - Ipad 数字仅在两个文本字段之一中

ios - 如何将按钮从一个 View Controller 隐藏到另一个 View Controller

ios - SCNAction.rotate 剪辑通过其他节点

ios - 子类 UIView 上的 UIPanGestureRecognizer

android - AIR ADT 重复包中的图标

ios - Google Play 游戏服务 iOS : [UITableViewWrapperView style]: unrecognized selector sent to instance

xcode - SceneKit SCNLookAtConstraint 无法重载 init

ios - 将离屏 SCNScene 渲染到 UIImage

iphone - ios我如何验证输入的电话号码实际上是用户的电话号码?

iphone - 在 CIFilter : getting empty image 中使用来自 CIColor 的 CIImage