简体   繁体   English

Unity3D锁定可配置关节

[英]Unity3D locking configurable joint

How do you lock configurable joint in Unity3D in new position? 如何将Unity3D中的可配置关节锁定在新位置?

When I set new position with Target Rotation, and then set Angular YMotion to Locked, it returns to it's original (not rotated) state and locks there. 当我使用“目标旋转”设置新位置,然后将“角度YMotion”设置为“锁定”时,它将返回到其原始(未旋转)状态并锁定在那里。 How do I avoid it? 如何避免呢?

If the "Locked" state does not work for you. 如果“锁定”状态不适用于您。 My guess is that you could try and use the LateUpdate function to achieve what you want. 我的猜测是,您可以尝试使用LateUpdate函数来实现所需的功能。

// LateUpdate is called after all Update functions have been called.
// This will ensure that your joint will always have the same rotation, even after the physics have been into play.
void LateUpdate() {
    // Set the target Rotation
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM