[Plugin] Custom Draw

  • Ah, yes

  • This is a really cool plugin, and I'm working on a simulation of relativistic effects like length contraction and time dilation, for which this plugin works really well. However for other things I'd like to do, I'll need the drawn quads to be interactable, like collision and stuff. Is that possible right now, or in the future maybe?

  • bjayfont

    I don't really have any plans to add collision stuff to this, it's a visual only plugin. All collision stuff would have to be done by other means.

  • This is a really cool plugin, and I'm working on a simulation of relativistic effects like length contraction and time dilation, for which this plugin works really well. However for other things I'd like to do, I'll need the drawn quads to be interactable, like collision and stuff. Is that possible right now, or in the future maybe?

    you could use Polygon plugin to make all collision stuff

  • bjayfont

    I don't really have any plans to add collision stuff to this, it's a visual only plugin. All collision stuff would have to be done by other means.

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

    you could use Polygon plugin to make all collision stuff

    I don't know of any Polygon plugin that allows you to set textures like this plugin does. 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.

  • bjayfont

    [quote:vzadujwl]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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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:

  • ...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

  • R0J0hound

    is there a limit to how much quads it will draw? i can only draw 34 quads D:

  • 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.

  • Thanks for sharing! R0J0hound

  • 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

  • marceloborghi

    It works here.

  • R0J0hound

    Moving to construct.net has broken all the links I think. I can't find the link to the plugin, anyway to fix this?

  • Pandy here is a new link. I also included the 2 example files.

    Have fun!

    https://www.dropbox.com/s/6q739tvpe933y1m/rojoCustomDraw.zip?dl=1

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)