unity父子物体_Unity中的父子游戏对象

unity父子物体

Parenting Game Objects

Its time to put your baby toys and milk bottle down, we are not taking care of tiny little gameObject babies anymore. Instead, we're gonna learn how to create child gameObjects of main gameObjects in the Hierarchy, a technique that proves to be quite useful when used with the Instantiate() method, that we have just learned about.

是时候放下您的婴儿玩具和奶瓶了,我们不再照顾小小的gameObject婴儿了。 取而代之的是,我们将学习如何在层次结构中创建主要gameObjects的 gameObjects,该技术在与我们刚刚学习的Instantiate()方法一起使用时被证明非常有用。

If you have directly arrived on this tutorial, we recommend you to check our last tutorial for understanding the ongoing example.

如果您直接接触了本教程,我们建议您检查我们的上一教程以了解正在进行的示例。

If you pay close attention to the character we've created in the previous tutorial, you will notice that the fireballs just spawn out of the middle of our main game character, not from where you would expect (Like in this case, the outstretched hand).

如果您密切关注我们在上一教程中创建的角色,您会注意到火球只是从我们主要游戏角色的中间产生的,而不是您期望的位置(例如,在这种情况下,伸出的手)。

Parenting Game Objects

Now, what if instead of the character, there was an invisible gameObject that shot t

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值