How do I offset the LoS origin?

Get help using Construct 2

Post » Sat Jan 09, 2016 3:00 pm

Hi,
my enemies spawn their projectiles from an image point that is not the spites' origin.
This results in enemies postioning themselves at corners that they look past but cant shoot past, cos the origin has LoS but not the gun. So the projectile gets stuck in the wall/corner.

Image

Is there a way to have the LoS behaviour check for a different position than the object's origin?
B
12
S
5
Posts: 204
Reputation: 1,648

Post » Sat Jan 09, 2016 9:35 pm

hm, not possblie then?
how about doing a manual line of sight test? how would i go about that, we don't have raycasts in 2d, do we?
B
12
S
5
Posts: 204
Reputation: 1,648

Post » Sat Jan 09, 2016 9:42 pm

Give the character an offset from walls.
Remove corners, round corners, alter collision polygon.
Create non solid barriers at corners.

Pick one.
Image ImageImage
B
166
S
49
G
155
Posts: 8,110
Reputation: 100,741

Post » Sat Jan 09, 2016 10:04 pm

Put the line of sight behavior on the gun.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,610


Return to How do I....?

Who is online

Users browsing this forum: LikeAlex2010, plinkie and 1 guest