I'm making a space shooter game on the visual kit and I want the asteroids to explode when ships contact them I do not want to collide with them, I just want to know when they will contact each other.
The problem is that I do not know when a ship collides with asteroid. How to apply the detection method E. For example, when I actually communicate with each other, I want to encode "coded" to log in.
I've already added categoryBitMask
and collisionBitMask
for both items, so how do I get it? Well, I'm doing everything on Swift.
does not provide an option to isolate the sneaket, contact collision solution for dynamic bodies find out. (If there is a kinetic body in your body, then the conflicts will not be resolved against it, but it will not be able to walk through physics.)?
However, it seems like the case of your use is consistent with the collision solution - because the asteroids are exploding, you do not need to care about the effects of collision on an asteroid (just view it Remove it and replace it with the explosion VFX, small asteroid, space slug, whatever). If the ship is to avoid collision and you do not want to affect it by collision, then just set the relative and relative relatives of the asteroid so that the asteroid does not provide significant speed.
When there is a confrontation, to do things, you have to set yourself on whatever category you are serving as your contact representative, the method of being notified of a collision. apply the.
In that method, you have to look at the node A
of the contact and how the categories of bodies collide to find out nodeB
(and which other ). Once you know that, like, node A
is a ship and nodeB
is an asteroid (or vice versa), you can kill the asteroid, your score Can update
Comments
Post a Comment