# Vectorial Examples

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
• I've created this post to let everybody post one or more examples of different uses of the VectorialCurve object.

A lot of different things can be done with this object. And a lot more will be done with new features.

In the attached file, you'll have an example of a basic solar system.

## Files

• Okay, this is a minor thing, but your example did make me want to ask for it.

When you set the "rotation by" x degrees that makes me want to simply get the current point that the rotation is at without creating a large expression.

I imagine that the Sun at the center was an AO arrow and I wanted to use MMF's AO angle to turn that arrow to always point at the Earth. Since we currently only use one VectorialCurve to create the rotation, then simply getting the degree we are setting it to would be an easy and fast way to rotate another object, like a compass, for instance, to correspond.

• When you set the "rotation by" x degrees that makes me want to simply get the current point that the rotation is at without creating a large expression.
> Don't understand... :crazy:

I imagine that the Sun at the center was an AO arrow and I wanted to use MMF's AO angle to turn that arrow to always point at the Earth. Since we currently only use one VectorialCurve to create the rotation, then simply getting the degree we are setting it to would be an easy and fast way to rotate another object, like a compass, for instance, to correspond.
> You can already do that with the expression "getAngle2PointsF()" expression which allow you to know the angle between two points of the curve.

• Oh, I see. Well, you are writing the docs for me as we go along

• Nothing too elaborate here, but it is a springy example that makes vectors useful without using Overlay. Could be used for a Diamond Thief-style game.

On a separate note in relation to my calculations:

One thing I don't like and don't know how to fix is if you watch the hanging ball "settle" down, the last few movements are rather jumpy or course. It makes a few small jerks before it stops. I wonder if that is the calculations I am making?

## Files

• Yeah !
Good example. I've played with it to give an aspect of a rope to the line.

• Cool! Glad you liked it

Another thing that I have not been able to do with that example is have the ball bounce off of things or keep it inside the frame. My math skills are not as sharp as I would like.

Either the new physics extension will allow for this effect, or we may have to look into a specific one for springyness. I am thinking along the lines of Soda Constructor.

Sphax, since you have so many useful functions in this object, I see that there are some potentially elaborate and interesting things that can be done. I am thinking along those lines and hope to come up with something.

Meanwhile, need more testers, especially for examples.

• Can you explain exactly what your trying to do with the ball effect you described? If it is just simple dynamics then my extension can handle it no problem, if it is soft body deformations then my extension can't do it (It isn't designed for it and MMF 2 still doesn't have really great ways to render everything).

• This is simple dynamics. Still not sure how the Fusion Dynamics might play into this.

Well, when I take control of the hanging ball that requires custom control of bounces, if you see what I mean. Some users are great at making custom engines.

So, this pertains more to the calculations I am using and bouncing/restricting. I probably need to explore that more. I see a custom movement opportunity here if the SDK ever gets popular/fixed up.

I was wondering: How viable is it to use this object as a path? Let's say I create a visible, basic line with two points. Then, I have a third point that moves along that line and set an AO to follow it. Might be useful.

• Here is a caption box with a line and an arrow.

I have always wanted to be able to create boxes like these with a flexible line and arrow to point to particular areas and items on the screen.

I used an offset and this may be able to be flexible enough to change the text dynamically while keeping a nice edge within the box around it. A rounded rectangle version might be nice, as well.

I used bounding box for the width in my calculation, but I was rather uncertain what "total size" is in the expressions. What does that represent?

Also, I know it may seem oddball and lazy, but would it be possible to create a preset that does what I just did so you use one rectangle/rounded rectangle with a point you can set on the box and a line that you can set to any position?

I see this example as useful for both game creators and application creators, so bravo again for this great extension!

## Files

• "total size" is the perimeter of the segments of your shape (without considering tension).

• Oh, I see.

Here is a slightly better version of that last example. I figure it covers more ground.

I noticed that rounded rectangle has Ray to set the roundness. The way it works is that it tends to make a bulging rectangle, though it is only noticeable at larger Ray sizes. That can be a useful effect in itself, but I would call that a bulging rectangle and, (being a Photoshop user) I would think of Ray simply changing the roundness of the corners only for "rounded" rectangle, if you see what I mean.

Ignore last example. This one is a wee bit better.

## Files

• Here is a hatch pattern previewer. Makes a good reference. I would have allowed for changing the colors using a picker, but we don't want to use non-standard extensions.

Note that patterns 53, 54, and 55 seem to be blank. They have no patterns that I can see.

## Files

• Star Lab:

This proves to be a good testing device, as well as a way to play with settings a user may want for a star they are going to create.

Of course, changes will be coming in the object, so this would not be a final version. As we note, I have to use AV's for some items that I would rather get right from the object itself.

I did note one thing that I am not sure is right. When I change any of my other settings, the tension goes back to zero. So, I guess I have to store and set the tension in all my other settings events?

Of course, we do see some odd lengths with the larger number of points on the star, but try 21 points. It seems that some stars take on a square shape rather than a circular one, around the periphery.

## Files

• I noticed that rounded rectangle has Ray to set the roundness. The way it works is that it tends to make a bulging rectangle
[color:#3366FF]> Yes, it's a bug because I've not found how to calculate a good tension...
Normally, the ray is intended to indicate the ray of the corners only.[/color]

I did note one thing that I am not sure is right. When I change any of my other settings, the tension goes back to zero. So, I guess I have to store and set the tension in all my other settings events?
[color:#3366FF]> Presets are done to do work for the user. A presets erases all points, creates all needed points and set the tension. ;)[/color]

Note that patterns 53, 54, and 55 seem to be blank. They have no patterns that I can see.
[color:#3366FF]> It's normal there is 52 patterns (0-52 writed in the title bar of the action parameter).[/color]

It seems that some stars take on a square shape rather than a circular one, around the periphery.
[color:#3366FF]> It's only a bug with the rendering of the thickness... if you set a thickness to 1, all stars types are ok. I'll see what I can do for this problem.[/color]

Good examples.

• Although I anticipate reworking the Star Lab example because I bet there will be some expressions I can use in future versions, here is a modified version of the last one.

This version retains all settings so that when you change one thing, everything else stays constant.

Edit: I just added a version that allows you to play with thickness, as well.

## Files

• Thanks for this last example, I've just seen that with the star preset and a tension you can make a nice flower.