统一拉绳子
如何在Mudrunner中创建一个绞车系统来拉动物体? 还是用绳索拉其他车辆或刚性物体? 我在Mudrunner Winch系统中看到了,我对如何使其团结一致非常感兴趣。您可以将自己拉到物体上或拉动被卡住的车辆 示例
How can I create a winch system like in Mudrunner, to pull objects?
Or to pull other vehicle or rigidbody object with rope?
I saw in mudrunner winch system and I am very interested on how to make it in unity. You can pull yourself to objects or to pull vehicles that are stuck
example
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我正确理解,当您拉一个对象时,您希望其方向保持相同,但它的距离与固定物体的距离降低。
对于GameObjects“目标”和“枢轴”,需要将“目标”朝向“枢轴”,可以使用以下方向“目标”移动:
朝这个方向移动目标会将其拉向枢。您可以使用以下任何方法将其移动,其中RB是目标的刚性体:
将Plldldirection或Pullspeed设置为您认为最适合游戏的任何方法。
If I understand correctly, when you pull an object, you want the direction of it to remain the same but the distance of it to the stationary object to decrease.
In the case of GameObjects "target" and "pivot" where "target" needs to be pulled towards "pivot", the direction "target" needs to move can be found using this:
Moving the target in this direction would pull it towards the pivot. You can use any of the following methods to move it, where rb is the target's rigidbody:
Set pullDirection or pullSpeed to whatever you think will work best for your game.