galtay's Forum Posts

  • 4 posts
  • Ha! That's a great idea. Find the intersection and then back off until there is no longer an intersection. I like it. Thanks very much.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think I understand what's going on now. Its a very nice effect. If I'm understanding correctly it will only work for roughly spherical objects?

    distance(self.X,self.Y,asteroid.X,asteroid.Y)-asteroid.Width*0.3[/code:6koywpuv]
    
    If I had a big elongated rotating cylinder as opposed to the spherical asteroid we'd be in trouble in terms of the placement of the flare and particles.  This will definitely make the asteroids game work but I guess that we don't have direct access to the collision systems coordinates in Construct 2.  Is that right?
  • Yes! I've downloaded and run the file. Exactly what I wanted. I'll study the event sheet and see if I can understand what its doing. Thank you!

  • Hi forums,

    I'd like to make an asteroids clone where the ship has a laser instead of firing projectiles. By laser, I mean when the mouse button is down, a ray is spawned and the nearest asteroid that the laser intersects with begins taking damage. I've got the above part down with a combination of "Is Overlapping" and "Pick Nearest". Now I was wondering if it was possible for me to grab the intersection point between the laser and the asteroid somehow so I can spawn some particle effects at that locations. The asteroid has a polygon bounding box and the laser is simply a long narrow rectangle sprite with its width set so that it extends from the ship to the asteroid.

    I've hacked together something that's kind of crazy, but would like to know if there's a better solution. Currently I'm sending a stream of invisible bullets out of the ship and when there is a collision with an asteroid and a bullet I move the position of the particles to that collision point. BUT I'd rather not have to send out a steady steam of bullets to get this done.

  • 4 posts