Matter-js: Magnetism property for objects.

Created on 18 Feb 2016  路  5Comments  路  Source: liabru/matter-js

I would like to suggest a new feature.
Can we add new object property which converts that object into a magnet.
Creating magnetic objects having north and south pole exactly same properties which a original magnet has.

feature-request

Most helpful comment

The plugin is now ready, check it out at matter-attractors.

All 5 comments

More generally these are known as attractors. My thoughts on this are as mentioned in #132:

I'll consider merging this but what I'd really like here are generalized attractor objects, rather than just a special case. That said, this feels like scope creep to me - I'd prefer this to live in a game engine.

I'm currently investigating patterns for creating plugins for matter.js, which would make it easier for people to create extensions like this.

Just opened a thread on a possible plugins approach that may be useful here.

I've just updated the plugins approach thread, including an attractors plugin, see this comment. This is not yet available in the master branch but it should be merged soon.

The plugin is now ready, check it out at matter-attractors.

Awesome, Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jack-guy picture jack-guy  路  3Comments

car1ot picture car1ot  路  3Comments

elrodsj picture elrodsj  路  3Comments

djipco picture djipco  路  4Comments

maximilianberndt picture maximilianberndt  路  4Comments