Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: jbaldwin on May 16, 2017, 02:09:33 PM

Title: Create a collider on a new gameObject...
Post by: jbaldwin on May 16, 2017, 02:09:33 PM
In game, if you click, then drag, then let go, a line will be made at the angle of where you started to where in let go. I would like to add a collider to this line (bar) that is tight to the new object.

Right now a collider is created on the line when the line is created, but it's not the right size at all.

I hope I am explaining myself right, does anyone have any thoughts or tips on this?

Thank you.
Title: Re: Create a collider on a new gameObject...
Post by: jeanfabre on May 17, 2017, 04:08:31 AM
Hi,

 you should be able to control the size of the collider you attached. have you tried this? you can use SetProperty for this.

 Bye,

 Jean
Title: Re: Create a collider on a new gameObject...
Post by: jbaldwin on May 17, 2017, 11:21:35 AM
Hi Jean,

Thanks for the quick reply. So after some fiddling, I think I know the problem a bit better. I am using the action Draw Line from the EcoSystem(I think you made the action). When the line is drawn, it's without a sprite, making the added collider unable to match its boundaries. My big issue is that the lines can be drawn at any angle (by intention). If I could get a sprite to match the boundaries, position, and angle of the texture "whatever it is", I would just have to add a collider after that.

Any thoughts? I feel like I am missing something.
Title: Re: Create a collider on a new gameObject...
Post by: jeanfabre on May 23, 2017, 04:29:30 AM
Hi,

 ouch, I see this is going to be tricky indeed. You should use a framework for this like:

https://www.assetstore.unity3d.com/en/#!/content/32762

let me know how this goes, indeed you may need to create custom actions though.

 Bye,

 Jean