How do I set the pointer to move only at given angle?

Get help using Construct 2

Post » Wed Aug 31, 2016 8:07 pm

I'm doing a 2D tool.

I can rotate and resize an object but i need that when the mouse drags a one dimension scaler(horizontal or vertical) lock the mouse to move only in the RED line angle to set the size.

Image

Actually works fine the size because i blocked the rest of the points. But you can move the mouse everywhere when you get some point to resize, and for the one dimensionscaler i want to lock the mose in the angle to be resized.

Is possible? how?

Or At least move the sprite only at given angle?
Last edited by matriax on Thu Sep 01, 2016 2:35 pm, edited 4 times in total.
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Wed Aug 31, 2016 8:17 pm

I wonder if you could make this work with Rex's boundary plugin.

You might have to lock the mouse onto a object, and use boundary on the object.

Take a look at the plugin and see if you can figure it out, if not I can try to throw something together as an example.
Justin

PS: I'd love to see what progress on your tool You've made.
Eat ALL THE BACON!
B
47
S
17
G
3
Posts: 290
Reputation: 5,068

Post » Wed Aug 31, 2016 8:24 pm

antares330 wrote:I wonder if you could make this work with Rex's boundary plugin.

You might have to lock the mouse onto a object, and use boundary on the object.

Take a look at the plugin and see if you can figure it out, if not I can try to throw something together as an example.
Justin

PS: I'd love to see what progress on your tool You've made.


@antares330 Thanks for the reply i'm goint to try that

THis is the tool at the moment, nothing big actually:
https://dl.dropboxusercontent.com/u/659 ... right.capx

You can resize(WIP), rotate, change opacity, change the Z-Index order and import/export the project composition. Also you can import external images that will be saved in Base64.

Is focused to work with sprites, no draws or pixels. Still is all a bit mess, will see :P
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Wed Aug 31, 2016 9:00 pm

I found a Mouse Lock Plugin: plugin-mouse-lock-v0-5-updated_t102112

I asked the author if this will be possible. I not understand very well the plugin and some things i tested the app crashed so maybe with last updates is not compatible :S .
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Wed Aug 31, 2016 9:19 pm

It's a great start on a tool :D

It gives me hope that I'm not the only one that has thought it would be possible to make tools with C2.
Eat ALL THE BACON!
B
47
S
17
G
3
Posts: 290
Reputation: 5,068

Post » Thu Sep 01, 2016 7:18 am

antares330 wrote:It's a great start on a tool :D

It gives me hope that I'm not the only one that has thought it would be possible to make tools with C2.


Thanks! Starts as a personal program for my needs but i will share in case can be useful to other people.

--------

I searched more in the forums and plugins/behaviours but i was not able to find nothing to do that :( , maybe i will have to ask somebody to make a plugin for it.
B
23
S
10
G
3
Posts: 545
Reputation: 4,442

Post » Thu Sep 01, 2016 1:00 pm

At least, any idea that how to lock the sprite movment to an angle? To move it by the RED Line? (the sprite angle)
B
23
S
10
G
3
Posts: 545
Reputation: 4,442


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests