Here is an example of drag and drop with re-size handles:
https://www.dropbox.com/s/2nlkpiwvpxz0i ... .capx?dl=1
made with r97
That's cool example! :D
Very nice example, added to the how do I FAQ. Thanks —
i really like it ^^ keep the good work :)
Thank you , very great exemple !!! <img src="smileys/smiley32.gif" border="0" align="middle" />
I've been playing with this, added keyboard nudge, right clicking handles to rotate with snap to 45 degrees if shift is held. But I'm stuck on getting the handles to size right when rotated with the sprite.
I've tried couple times, but it gets bloated, and never really works. It's nicer using it with the handles floating over the rotated sprite in a global fashion. So that's what I will use unless someone can figure out how to work the floating X & Ys.
Here's R0J0's code with the nudge and rotate if someone wants to add some more resize/rotate features:
Develop games in your browser. Powerful, performant & highly capable.
Here's an updated example that positions the handles correctly when rotated.
https://www.dropbox.com/s/gz8n74b6p6p9g ... .capx?dl=1
You can right click anywhere to do rotation and I eliminated the need of an array.
Wow you really topped the first version. This one is so compact I can't see how it's working. How does that adding and subtracting the handle's positions work, so I can try and add limits? (max size or snapping)
Thanks, my level editor is already much better with this alone.
Any ideas on multiple selections? (I may not do that, it'snot that important.)
Max size is doable by using clamp() on the action in event 4 to set the sprite size. Snapping to sizes in increments of say 32 is also doable with round(width/32)*32. Snapping handles to arbitrary positions would be a lot more complex mathematically.
I had tried something like that with MIN, but clamp does work better as it can stop in the negative direction as well.
But it has a quirk when you drag past the clamped size where it jumps around and flickers positive to negative sizes. Which led me to believe I must not know what's going on.
R0j0 Strikes back ! Well done , man !
This is awesome. I was trying to find out how to do this. Thanks for posting.
Thx for sharing! Works perfect!
Thanks! This totally saved me a good chunk of time!!!
This is really amazing way to resize and rotate a sprite!
Is there a Behaviour or Plugin for the same task?
I'm a beginner C2 user, such tool is very impressive and useful.
Sorry about my bad English.