gpt4 book ai didi

unity3d - 为 Unity 创建绳索物理

转载 作者:行者123 更新时间:2023-12-03 17:52:29 31 4
gpt4 key购买 nike

我想在 Unity 中创建一个类似蹦极的游戏,因此我需要一个绳索物理。我特别需要能够在稍微拉伸(stretch)后以速度拉动物体的弹性绳索。你知道从哪里开始吗?因为我不知道如何开始编写这样的脚本。

我看了 Assets 商店。有一些绳索物理模拟器,但我必须自己做,而且它们真的很贵。

我已经尝试在 Unity 中使用 Spring 和/或 Configurable Joints,但它们没有提供我想要的。

编辑:我现在正在研究雅各布森放松法。如果您有更多的方法可以提供,或者对方法有深入的了解,请随时帮助我。

最佳答案

有一个example on the Unity Wiki创建基于 3d 物理的​​绳索。这可能需要一些配置才能按照您的需要工作。

有一个Asset on the Asset store只需 15 美元。但是,对于您正在做的事情来说,这可能有点太复杂了。

The NEW QuickRopes 2 rope physics editing tool has been completely re-written for ease of use in mind. This tool is a powerful new way to generate and edit complex rope simulations. Use the built in spline editor to form your ropes into endless shapes before you ever hit play! Do you want to use cloth as your rope? Now you can with the new Cloth mesh type!



来自 this问题:

If you want to make a physics rope, it will take several segments of rigid bodies attached by Joints. Currently your best bet would be the HingeJoint.

I recently worked on a Unity-powered game where we had a chain/rope-like string of objects that trailed behind the character and that was the class we used to tie those rigid bodies together.

I'm going to be honest, this is a pretty intricate task and there isn't really an easy way to implement this - especially the winding/unwinding functionality.

My personal advice is this - fake it as best you can. Unless the entire game is solely about the most realistic crane ever built, just fake it.

关于unity3d - 为 Unity 创建绳索物理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17588448/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com