How do I Pin light to object

Get help using Construct 2

Post » Fri Mar 06, 2015 11:16 pm

Hi, i have created a wall with bump effect. Now i cant see to be possible to pin the light to any object . All i can see is the light effect properties. Does construct have 2d light object which can be moved, pinned , duplicated and so on and will affects the bumped wall??
B
11
S
3
G
1
Posts: 419
Reputation: 1,782

Post » Sat Mar 07, 2015 12:37 am

Just like pinning any sprite to another, you need to give the light source the "Pin" behavior.
B
40
S
12
G
11
Posts: 331
Reputation: 7,752

Post » Sat Mar 07, 2015 8:53 am

ok but where is the light source? If i add an bump effects to my normal map, there is already light , but where ? i dont get it, sorry
B
11
S
3
G
1
Posts: 419
Reputation: 1,782

Post » Sun Mar 08, 2015 6:03 am

I just played around with the bump-mapping effect a little bit.

From what I can tell, the effect is (understandably) confined to the sprite you are applying it to.
There are 4 parameters Light X, Light Y, Light Z, and Intensity.

Light X and Light Y both start out with values of 50. Now, I think, though I'm not completely certain, that these values correspond to %of distance on each axis.

So Light X of 50 is half-way across the texture or, 50%. And, a value of 100 would place the light source at the far edge of the texture

I might be wrong, but if this is how it actually works, then I don't know how I would make use of this in a game since this basically means that the light source needs to be static. And if it's static, then that reduces the usefulness of the effect greatly, since you can just bake the effect into the texture before-hand.

I'll try playing with this more to see if I can figure out anything more.
B
17
S
2
Posts: 66
Reputation: 1,382

Post » Sun Mar 08, 2015 6:10 am

Ok, that didn't take as long as I thought it would, I tried some more things and discovered something.

Although the effect parameter states that it will accept values of 0-100, I think this is a little misleading.

In my test project, I got the cursor's %position on the texture, and if this value goes above 100% then the light behaves correctly and appears to move off into the distance the further the cursor is.

Take a look at the example if you want to see what I mean.
You do not have the required permissions to view the files attached to this post.
B
17
S
2
Posts: 66
Reputation: 1,382

Post » Sun Mar 08, 2015 10:38 am

thank you gonna check it out.
B
11
S
3
G
1
Posts: 419
Reputation: 1,782


Return to How do I....?

Who is online

Users browsing this forum: t redeemed t and 30 guests