How do I calculate the centre?

Get help using Construct 2

Post » Thu Jan 26, 2017 9:30 am

How do I get the X between a & b?
a-----------------X----------------b
a----X-----b
Tried: a.X + b.X / 2
yes.

__

|:D|

Gamjolt account:http://gamejolt.com/profile/masgame/409321/
B
35
S
14
G
3
Posts: 38
Reputation: 4,832

Post » Thu Jan 26, 2017 10:03 am

That's correct if X is always exactly in the middle of a and b.
B
47
S
17
G
81
Posts: 2,221
Reputation: 48,089

Post » Thu Jan 26, 2017 10:05 am

You forgot the parenthesis.
(A.x+b.x)/2
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Post » Thu Jan 26, 2017 9:00 pm

Ohh, forgot about the parenthesis. :D
yes.

__

|:D|

Gamjolt account:http://gamejolt.com/profile/masgame/409321/
B
35
S
14
G
3
Posts: 38
Reputation: 4,832


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot], zenox98 and 6 guests