[behavior] rex_spline

Post your work in progress addons and get feedback

Post » Mon Jul 11, 2016 3:04 pm

@Jeff Skyrunner

Do you mean that carrying custom data for each point?
No, I don't have plan for this feature recently.
B
108
S
26
G
267
Posts: 4,455
Reputation: 149,745

Post » Tue Jul 12, 2016 9:05 am

Ok, thank you :)
I'm not a insane, my mother had me tested

I'm an engineer. To save time, just assume I'm never wrong
B
30
S
13
G
4
Posts: 141
Reputation: 4,832

Post » Tue Jul 19, 2016 12:10 pm

@rexrainbow, Thanks for this plugin...I am trying to use this and get a javascript error when I try to create the spline "obj" at run time using --> System create obj and then setting obj --> set spline speed to some value. The error that I get is "Cannot set preX property" line 149 in rex_spline.js
Last edited by kmsravindra on Tue Jul 19, 2016 12:42 pm, edited 1 time in total.
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Tue Jul 19, 2016 12:27 pm

@kmsravindra

Try to update this behavior to latest one
B
108
S
26
G
267
Posts: 4,455
Reputation: 149,745

Post » Tue Jul 19, 2016 12:36 pm

@rexrainbow, I seem to have the latest one...just downloaded from here - http://c2rexplugins.weebly.com/rex_spline.html

and it shows no changes..The timestamp and the bytes exactly match for all the files...

The error says - " Cannot set property PreX of undefined. Line num - 149

By the way, I am trying to create obj every 1sec at runtime, so that many are created that follow the path...The use case being, lets say I want to simulate current in a circuit.
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Tue Jul 19, 2016 1:04 pm

@kmsravindra

I updated again. Please download it again.
Please provide a simple test case if still find bugs. Thanks.
B
108
S
26
G
267
Posts: 4,455
Reputation: 149,745

Post » Wed Jul 20, 2016 4:59 am

@rexrainbow, thanks a lot...I will try it and let you know...

I know that it is a big ask, but wanted to know if there could be possibility of branching off to a different path from each waypoint by assigning some probability to that waypoint. For example - lets say at an intermediate waypoint, I assign a probability of 50% and draw a different branch ( either at run time OR edit time), then the travelling obj could take either of the paths (at 50% probability) once it reaches that intermediate waypoint. I think this feature also needs the ability to draw multiple paths as well..Do you think such a thing can be possible?
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Wed Jul 20, 2016 5:15 am

@kmsravindra

Spline is a curve which interpolation internal points from 4 points
- index previous one (-1)
- index current (-0)
- index next (+1)
- index next two (+2)

So it is not possible to change any point of position (-1, -0, +1, +2) while moving between (-0) to (+1). The curve will be broken.


Try this solution if you want to smooth moving to a dynamic position
- Add bullet behavior to drive sprite move along
- Every tick rotate (action rotate toward position, not action set angle) the angle of sprite toward target position
Here is a demo using this solution, try dragging the target point to see the footprint of object.
B
108
S
26
G
267
Posts: 4,455
Reputation: 149,745

Post » Wed Jul 20, 2016 5:42 am

@rexrainbow, Thanks for the response. I am aware of alternate ways of doing it in C2...The spline curve plugin was so easy to deal with, I Just was curious if such alternate branching could be implemented here...Anyway, thanks for the amazing plugin...
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Wed Jul 20, 2016 6:11 am

@kmsravindra

You could determine the position of middle points before starting if possible.
B
108
S
26
G
267
Posts: 4,455
Reputation: 149,745

PreviousNext

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest