How do I Find the Middle Point Between Two Objects?

Get help using Construct 2

Post » Tue Feb 24, 2015 10:31 am

I have two characters I can control individually and at the same time, when controlling them both at the same time, I want to place my camera object between both characters. Can't figure it out.
B
43
S
13
G
8
Posts: 622
Reputation: 7,392

Post » Tue Feb 24, 2015 11:11 am

Is this what you mean?

https://www.dropbox.com/s/u9sqydw35hmoo ... .capx?dl=0

I couldn't upload an attachment for some reason..
Last edited by codah on Tue Feb 24, 2015 11:15 am, edited 1 time in total.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Feb 24, 2015 11:15 am

Find out the distance between them, e.g. horizontally X2 - X1
Divide by 2 to half it
Add to the original X1
B
13
S
4
Posts: 65
Reputation: 875

Post » Tue Feb 24, 2015 3:10 pm

@codah
@majesticAsFk

That's brilliant thanks guys all working
B
43
S
13
G
8
Posts: 622
Reputation: 7,392

Post » Tue Feb 24, 2015 6:33 pm

i believe the same is
middle=(x1+x2)/2
B
8
S
3
Posts: 63
Reputation: 736

Post » Tue Feb 24, 2015 7:08 pm

This work if y1 and y2 are the same.

Otherwise, it will be :
x_middle = (x1+x2)/2
y_middle = (y1+y2)/2

:)
B
6
S
1
Posts: 45
Reputation: 509


Return to How do I....?

Who is online

Users browsing this forum: DharmaOne and 21 guests