gpt4 book ai didi

swift - SKEmitterNode 对另一个对象的强制爆炸

转载 作者:行者123 更新时间:2023-11-28 08:21:06 25 4
gpt4 key购买 nike

我的 SKScene 中发生爆炸,我希望这个爆炸甚至影响靠近它的另一个对象,对象在所有方面。我想给他们力量以逃避这个爆炸。

最佳答案

听起来你需要一个 SKFieldNode 来实现一个 vortexField():

https://developer.apple.com/reference/spritekit/skfieldnode#1654415

SKFieldNode:

A node that applies physics effects to a portion of the scene.

涡流场()

Creates a field node that applies a perpendicular force to physics bodies.

关于swift - SKEmitterNode 对另一个对象的强制爆炸,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41281723/

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