How do I draw a sine curve

Get help using Construct 2

Post » Mon May 26, 2014 10:51 pm

Hi,
I am trying to draw a sine curve dynamically like this :

https://dl.dropboxusercontent.com/u/107104215/Sample/index.html

My problem is that bullet or custom movement behaviors don't work properly when fps is low so the line is scattered.

Someone knows how to achieve this with a better way?

Thank you
B
14
S
4
G
2
Posts: 190
Reputation: 3,938

Post » Tue May 27, 2014 7:02 am

Instead of just creating circles you could also create lines from circle to circle. The line can be done by rotating and scaling a sprite like in this example:
how-do-i-expressions_t106009

I found a capx in my files that may also be of help:
https://dl.dropboxusercontent.com/u/542 ... trace.capx
B
94
S
33
G
114
Posts: 5,357
Reputation: 73,775

Post » Tue May 27, 2014 7:52 am

Ok will try.

Thank you!
B
14
S
4
G
2
Posts: 190
Reputation: 3,938

Post » Tue May 27, 2014 10:39 pm

Thanks @R0J0hound but it's not exactly what I need, I would like sine curves with your idea I would have angular curves.
Do you think I can achieve it with plugin like canvas plugin?
B
14
S
4
G
2
Posts: 190
Reputation: 3,938

Post » Wed May 28, 2014 2:12 am

R0j0s example fiddled to match your example a bit more. Not perfect, it's a start.

R0J0_Line_Trace.capx


I do agree that the Canvas plug in will produce much better results with far less resources but I don't know how to do it.
You do not have the required permissions to view the files attached to this post.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Wed May 28, 2014 3:03 pm

And here is the same example using the Canvas Plugin. I have no clue on how the looping and the scrolling can be made though.
You do not have the required permissions to view the files attached to this post.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Wed May 28, 2014 3:12 pm

Great! I will check this and let you know.
Thank you!
B
14
S
4
G
2
Posts: 190
Reputation: 3,938

Post » Fri May 30, 2014 6:32 am

Hi,
Thanks, the SineCanvas seems to be the best way to do it.
If someone could help on finding a way to loop and scroll the created line like the example I sent before ?
Thanks
B
14
S
4
G
2
Posts: 190
Reputation: 3,938


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests