[Plugin] Custom Draw

Post your work in progress addons and get feedback

Post » Sat May 27, 2017 9:03 pm

@bjayfont
So then I don't suppose there's any way to do collision with events then..?

Yes, and no.
Search google for "collision detection tutorial" to get ways to do the math and stuff. Not exactly simple. The drawback is it won't interact with C2's collision system, so unless you want to do all the movement behaviors with events too it may not be the best choice.

The polygon plugin may be a workable solution, since it can interact with c2's collision system. Presumably you'd just need the positions of the corners of the quads to set the vertices of the polygon plugin. It's probably easier said than done.

Anyways those are some ideas to try out if you'd like.
B
94
S
33
G
118
Posts: 5,394
Reputation: 75,849

Post » Sun May 28, 2017 7:38 am

Well I've done something of my own collision system with the custom movement plugin, since non of the regular "push out of solid" action options really worked all that well for me, so I think I should be able to do that. A lot of the expressions and stuff for your plugin are kind of a mystery though. Like, I'm not sure how I would go about getting the positions of the vertices of the different quads, for one. Also I might have to change the way I use it, not sure, though. Basically I move everything around the player, rather than moving the player around the layout. So I have the one Custom Draw object and then I use the Matrix Translate to move everything, according to player input. So collision might be even weirder that way, but I can't be sure yet o:
B
25
S
11
G
3
Posts: 25
Reputation: 3,377

Post » Mon May 29, 2017 1:48 pm

bjayfont wrote:...Unless you're suggesting using a separate polygon plugin for collision, and then using a whole other set of events in order to sync the polygon size/shape with that of the quads in this plugin.

ye, pretty much :)
B
9
S
3
G
1
Posts: 17
Reputation: 1,209

Post » Mon May 29, 2017 1:52 pm

@R0J0hound
is there a limit to how much quads it will draw? i can only draw 34 quads D:
B
9
S
3
G
1
Posts: 17
Reputation: 1,209

Post » Mon May 29, 2017 3:24 pm

There are two expressions that you can use to calculate the position. You just provide the the same xy values you use is in a add vertex action. It's relative to the objects position in the layout but I don't seem to have provided position access to the event sheet which isn't great.

There isn't a limit, the examples use well over 34 quads.

In general I've stopped working on this. It was a fun expirement and hopefully it has its use as is to some.
B
94
S
33
G
118
Posts: 5,394
Reputation: 75,849

Post » Tue May 30, 2017 7:50 am

Thanks for sharing! @R0J0hound
B
159
S
27
G
17
Posts: 917
Reputation: 32,677

Post » Fri Jul 14, 2017 4:33 pm

@R0J0hound How do I create shapes like trapezium? Because I followed the instructions of your mini tutorial and made a square even with the points forming something not symmetrical. Use draw quadrs don't work to not symmetrical form
B
11
S
3
Posts: 7
Reputation: 741

Post » Mon Jul 17, 2017 4:26 pm

@marceloborghi
It works here.
B
94
S
33
G
118
Posts: 5,394
Reputation: 75,849

Previous

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests