[Behavior] SplinePath

Post your completed addons to share with the community

Post » Tue Nov 05, 2013 4:20 pm

Thanks, @zenox98. I guess it is back to the drawing board!
B
7
S
1
Posts: 4
Reputation: 432

Post » Wed Nov 20, 2013 6:10 pm

Is this plugin still working fine in lates v of c2 and node-webkit?
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
71
S
19
G
19
Posts: 1,919
Reputation: 16,910

Post » Tue Dec 17, 2013 5:26 am

This is an awesome plugin. Was there any progression on getting speed working?

I tried mucking with runtime.js and here we have...

var segNum = Math.floor(t * numSegments);
var microT = (t - segNum/numSegments) * numSegments;

This is handling the time (thus speed) of the movement.
If I continue to add points, it goes REALLY fast. Not what I need. I need to either go by controlled speed thats constant throughout all nodes, regardless of how many nodes there are (which should be the easiest to do) or control time between each node (harder to do).

But if I change anything in these numbers, the plugin acts very abnormalAnthonyB282013-12-17 06:41:24
B
10
S
3
G
3
Posts: 47
Reputation: 2,666

Post » Tue Feb 04, 2014 4:04 pm

Update for those interested in the RB Vector implementation. This plugin now works with the latest Firefox 27.0 release.zenox982014-02-04 16:05:57
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,839
Reputation: 48,279

Post » Fri Feb 21, 2014 4:19 am

AnthonyB28 wrote:This is an awesome plugin. Was there any progression on getting speed working?

I tried mucking with runtime.js and here we have...

var segNum = Math.floor(t * numSegments);
var microT = (t - segNum/numSegments) * numSegments;

This is handling the time (thus speed) of the movement.
If I continue to add points, it goes REALLY fast. Not what I need. I need to either go by controlled speed thats constant throughout all nodes, regardless of how many nodes there are (which should be the easiest to do) or control time between each node (harder to do).

But if I change anything in these numbers, the plugin acts very abnormalAnthonyB282013-12-17 06:41:24


Following up on this.. has anyone had any luck with implementing speed options?

At the min. is anyone able to point out where I can adjust the overall speed (things are moving too slowly for me atm).
B
4
Posts: 18
Reputation: 230

Post » Wed Apr 23, 2014 11:34 am

hi, I would like to report a problem with this plugin (not posting in "bugs" section since it's 3rd party).

I have the following event:

Image


And when I pressed J, I got this:

Image

I would also like to point out that this behavior has absolutely no properties, or any possible event conditions, and only two actions. I would highly suggest improving it. :)
B
12
S
2
Posts: 102
Reputation: 1,076

Post » Mon Apr 28, 2014 12:57 am

DialgaBrite wrote:hi, I would like to report a problem with this plugin (not posting in "bugs" section since it's 3rd party).

I have the following event:

Image


And when I pressed J, I got this:

Image

I would also like to point out that this behavior has absolutely no properties, or any possible event conditions, and only two actions. I would highly suggest improving it. :)


I think you might want to enable path first, then add point.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
71
S
19
G
19
Posts: 1,919
Reputation: 16,910

Post » Fri May 02, 2014 8:37 pm

This is great!
Very useful thanks.
B
19
S
3
G
4
Posts: 79
Reputation: 3,711

Post » Sun Oct 05, 2014 7:32 pm

megatronx wrote:
DialgaBrite wrote:hi, I would like to report a problem with this plugin (not posting in "bugs" section since it's 3rd party).

I have the following event:

Image


And when I pressed J, I got this:

Image

I would also like to point out that this behavior has absolutely no properties, or any possible event conditions, and only two actions. I would highly suggest improving it. :)


I think you might want to enable path first, then add point.


First post so bear with me... :)

Was looking for a way to traverse a path and stumbled on this pode spline behaviour. It seems to do to the trick and after this minor modification the "Unable to get property '0' of undefined or null reference" error disappeared. Problem seemed to be with the time value, which is intended to be 0..1. In the fix after time passes one the behaviour is disabled (this may not always be wanted behaviour though).

Line 91 ->
Code: Select all
               if(this.time <= 1) {
                  this.points_.getPos(this.time);
                  
                  this.inst.x = behinstProto.currX;
                  this.inst.y = behinstProto.currY;
                  this.inst.set_bbox_changed();
               }
               else {
                  this.activated = false;
               }


Edit: Actually I was still getting the getPos problem. Fix was for the problem when the spline had ended. As I said "first post.." :/
B
3
Posts: 7
Reputation: 189

Post » Tue Oct 07, 2014 7:37 pm

Few additions to original package:

- Possibility to set spline traverse time in seconds with new action "Set time".
- GetPos error fixed.
- Error at the end of the path fixed.
- Event "On finished" triggered at the end of the spline .
- Action "Reset" added to reset splinepath to defaults.
- Action "Toggle" added to toggle state (Enabled/Disabled).

Usage:
1. Add all points to the path with consecutive calls to "Add point to spline" action.
2. Set traverse time in seconds with "Set time" action. If omitted time defaults to 1s.
3. Activate spline.
4. Toggle state - Optional.
5. Add trigger "On finished" to wait for spline path to end - Optional.
6. Reset Spline path to defaults - Optional.

All credits to original package creator Pode (and respective owners of algorithms).

Edit: Not enough reputation so attaching package to post.
Edit2: Updated post to include new features and attachments.
You do not have the required permissions to view the files attached to this post.
Last edited by ovirta on Fri Oct 10, 2014 5:18 am, edited 3 times in total.
B
3
Posts: 7
Reputation: 189

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests