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,836

Post » Thu Jan 26, 2017 10:03 am

That's correct if X is always exactly in the middle of a and b.
B
48
S
19
G
84
Posts: 2,289
Reputation: 49,957

Post » Thu Jan 26, 2017 10:05 am

You forgot the parenthesis.
(A.x+b.x)/2
B
94
S
33
G
123
Posts: 5,449
Reputation: 78,461

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,836


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 29 guests