How do I create an infinity or an eight sign trajectory?

Get help using Construct 2

Post » Thu Mar 19, 2015 7:35 pm

I need to create an infinity or an eight sign trajectory in Construct2 without extra plugins.
I have found the formulas but I can't port them because I don't know Math enough :lol: :cry: :x

First formula
x = cos(t);
y = sin(2*t) / 2;

and looks like this:
Image
Lemniscate of Gerono animation

Second formula:

scale = 2 / (3 - cos(2*t));
x = scale * cos(t);
y = scale * sin(2*t) / 2;

It looks like this:
Image
Lemniscate of Bernoulli animation
B
93
S
34
G
23
Posts: 389
Reputation: 19,653

Post » Thu Mar 19, 2015 8:02 pm

Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
20
S
9
G
1
Posts: 786
Reputation: 3,729

Post » Thu Mar 19, 2015 9:07 pm

mindfaQ wrote:there you go:
https://copy.com/peH6Upm8jirpoI31


You are genius man. Thanks a lot!
B
93
S
34
G
23
Posts: 389
Reputation: 19,653

Post » Fri Mar 20, 2015 7:13 pm

@mindfaQ

Is there a way to have two blocks running in the same trajectory in different direction?


thanks,
B
93
S
34
G
23
Posts: 389
Reputation: 19,653

Post » Sat Mar 21, 2015 7:50 am

different direction: either use a minus in front of every "cycle" you see in the sin/cos formulas OR instead of adding dt to the cycle, substract dt from it.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
20
S
9
G
1
Posts: 786
Reputation: 3,729

Post » Sat Mar 21, 2015 9:01 pm

Thank you very much!
B
93
S
34
G
23
Posts: 389
Reputation: 19,653


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 1 guest