[behavior] rex_spline

Post your work in progress addons and get feedback

Post » Thu Jun 30, 2016 4:25 am

Update

Get X/Y co-ordinate of start or end point by

Expression:CurSegP0( 0 ) or Expression:CurSegP0( "x" ) , X co-ordinate of start point
Expression:CurSegP0( 1 ) or Expression:CurSegP0( "y" ) , Y co-ordinate of start point
Expression:CurSegP1( 0 ) or Expression:CurSegP1( "x" ) , X co-ordinate of end point
Expression:CurSegP1( 1 ) or Expression:CurSegP1( "y" ) , Y co-ordinate of end point


@newt
See the sample capx in document.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

Post » Thu Jun 30, 2016 5:25 pm

@rexrainbow I got an error when opening your capx demo project. Also tried to access the 'CurSegP0' expression in the expression list, but nothing shown there.

A bug maybe?

Image

edit: FYI, my plugins are all up to date and i'm currently using C2 beta release 230

edit #2: Sorry.. sorry... my mistake. i didn't realize the latest version. It's all fixed now. :D
B
8
S
3
Posts: 1
Reputation: 663

Post » Thu Jun 30, 2016 8:09 pm

Ok so to get the end x, and y of the current point:
Sprite.Spline.Point(Sprite.Spline.CurSegP1,"x")
Sprite.Spline.Point(Sprite.Spline.CurSegP1,"y")
Image ImageImage
B
169
S
50
G
174
Posts: 8,330
Reputation: 110,804

Post » Fri Jul 01, 2016 1:21 am

@newt

Or get position of end point by ( Expression:CurSegP1( "x" ) , Expression:CurSegP1( "y" ) )
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

Post » Fri Jul 01, 2016 3:57 am

Ok, that would be simpler.
Thanks again.
Image ImageImage
B
169
S
50
G
174
Posts: 8,330
Reputation: 110,804

Post » Fri Jul 01, 2016 10:02 am

I'm always impressed by @rexrainbow and his plugins! I don't even know how he come up with all this.
Follow my progress on Twitter
or in this thread Archer Devlog
B
40
S
17
G
17
Posts: 992
Reputation: 12,656

Post » Sat Jul 02, 2016 12:53 am

Update

Fix a possible bug when save/load.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

Post » Sat Jul 02, 2016 3:29 pm

Thanks a lot :)

A nice feature would be adding the facing at n-th point... do you think this could be possible?
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 » Sat Jul 02, 2016 7:52 pm

Jeff Skyrunner wrote:Thanks a lot :)

A nice feature would be adding the facing at n-th point... do you think this could be possible?

You mean the angle?
Image ImageImage
B
169
S
50
G
174
Posts: 8,330
Reputation: 110,804

Post » Sun Jul 03, 2016 1:19 am

Update

Add property "Set angle" , "Expression:AngleOfMotion"

Set property "Set angle" to "Yes" to set object's angle to the angle of motion. Or get this angle of motion by "Expression:AngleOfMotion".


@Jeff Skyrunner
Try this new version.
B
108
S
26
G
272
Posts: 4,472
Reputation: 152,279

PreviousNext

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests