How Do I Intersect An Object Or Obstruct It?

For questions about using Classic.

Post » Sat May 26, 2012 7:45 am

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.
B
6
S
1
G
1
Posts: 52
Reputation: 858

Post » Sat May 26, 2012 10:50 am

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:
instantlaser.cap

edit:
actually it was an example by ashleyoppenheimer2012-05-26 10:52:59
B
59
S
7
G
2
Posts: 93
Reputation: 4,228

Post » Sat May 26, 2012 10:09 pm

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.
B
6
S
1
G
1
Posts: 52
Reputation: 858

Post » Mon Dec 14, 2015 2:32 pm

.
Last edited by danieltpt on Tue Dec 15, 2015 1:49 pm, edited 1 time in total.
B
9
S
2
G
5
Posts: 33
Reputation: 3,194

Post » Mon Dec 14, 2015 3:15 pm

@danieltpt
danieltpt wrote:hi, @superpowerjoe did you finally understand how the bullet and LaserEnd is used?

I am trying to figure how bullet and LaserEnd works also

thanks


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.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,841
Reputation: 48,283


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests