对象如何站在动画平台上
How can an Object stand on an animated Platform
我有一个使用 Unity 制作动画的平台,如果角色在平台上跳跃(动画是从左向右移动...),角色会静止不动,因为平台移动角色会掉出平台世界.
我想让我的角色像在超级马里奥游戏中那样随着平台移动。
一些信息:
2D 游戏,例如超级马里奥兄弟
脚本:C#
程序:Unity 5.3
将您的角色与移动平台对齐始终是一个棘手的过程,尤其是当您使用 Unity3D 的内置物理时。
Here's an answer,我在 unity 论坛上找到了关于让角色控制器随浮动平台移动的很好的讨论。希望对您有所帮助。
您可以使用 transform.parent and then check if the player is parented and move it by its local position using transform.localPosition
尝试通过平台培养玩家
我有一个使用 Unity 制作动画的平台,如果角色在平台上跳跃(动画是从左向右移动...),角色会静止不动,因为平台移动角色会掉出平台世界.
我想让我的角色像在超级马里奥游戏中那样随着平台移动。
一些信息: 2D 游戏,例如超级马里奥兄弟 脚本:C# 程序:Unity 5.3
将您的角色与移动平台对齐始终是一个棘手的过程,尤其是当您使用 Unity3D 的内置物理时。
Here's an answer,我在 unity 论坛上找到了关于让角色控制器随浮动平台移动的很好的讨论。希望对您有所帮助。
您可以使用 transform.parent and then check if the player is parented and move it by its local position using transform.localPosition
尝试通过平台培养玩家