SKAction move forward

前端 未结 2 877
耶瑟儿~
耶瑟儿~ 2020-12-19 23:41

How do I get a SKNode to move forward?

I\'ve been able to get the node to move in a fixed direction using [SKAction moveByX:y:duration:] bu

2条回答
  •  醉话见心
    2020-12-20 00:12

    I have thought about this as well. I want to make a node that can seem to be turning before proceeding. One way I have considered doing this is to have a child node attached the the "forward-most" portion of the node that is moving in the scene. Then I would calculate the distance of the tap form the child node. Does that make sense? Essentially, I would be able to calculate the front of the node from a tap anywhere in the scene.

提交回复
热议问题