How do I make an object get larger as it gets closer?

Get help using Construct 2

Post » Tue Jul 07, 2015 10:30 pm

I simply want to make a circle increase in size the closer a certain object gets to it.
B
17
S
4
G
4
Posts: 59
Reputation: 3,121

Post » Wed Jul 08, 2015 12:24 am

hi,

1) calculate the distance distance(circle.x,circle.y,object.x,object.y)
2) as you now have the distance value in pixel you can work with this. you can either set the circle with and high or the object scale acording to the distance left.
for example set object scale to 1+(distance/1000*(-1))

regards
B
19
S
7
G
1
Posts: 222
Reputation: 2,551

Post » Wed Jul 08, 2015 12:29 am

It's quite simple actually, but you need to do some calculations.

Here, I made a example for you, hope it helps t clear things up: https://dl.dropboxusercontent.com/u/183 ... ample.capx
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Wed Jul 08, 2015 12:32 am

Here is another example:

Image
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Thu Jul 09, 2015 10:30 pm

nimos100 wrote:Here is another example:

Image


Thank you I tried this method and it worked great!

I appreciate all the help everyone.
B
17
S
4
G
4
Posts: 59
Reputation: 3,121


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests