How Do I Intersect An Object Or Obstruct It?

This forum is currently in read-only mode.
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • So I have a "cannon", that shoots a laser-like ray, so instead of shooting various "bullets" it shoots only one long ray.

    The "cannon" spins on its own axis. And and the ray rotates along with it, like the dials of a clock.

    Now, i have some wall-like obstacles, that i want to obstruct the path of the ray.

    Is there any way to do this? so that when the ray rotates on the axis of the cannon, make it not go past (in terms of radius) once it hits a wall, in the same manner that when light hits an opaque object it doesnt move through it and you have a shadow on the other side.

    OR instead, how would this be done: ray is object A, and wall is object B, whenever B overlays A, intersect A's collision mask, so that the part occupied by B isnt accounted for?

    hope any of this made sense.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you could try an invisible helper-bullet with instant hit to get the final collision point. then draw you laser from turret to that destination point.

    here is a cap from someone in the forum i downloaded once:



    actually it was an example by ashley

  • Great! i think that works perfect, thanks!

    what i dont understand however is, once spawned how is the bullet object moving forward. as for everything else i think i get it.

  • .

  • danieltpt

    hi, superpowerjoe did you finally understand how the bullet and LaserEnd is used?

    I am trying to figure how bullet and LaserEnd works also


    Do you realize you have responded to a 3 year old thread from the (now retired) Construct Classic section?

    Also, it's worth checking a User's profile, as then you would have seen that superpowerjoe hasn't been on this forum for over 3 years.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)