-
Notifications
You must be signed in to change notification settings - Fork 184
Description
Hello everyone!
I am using react-native-game-engine
and matter-js
for my application and I want to render a shape of my SVG element for example. On the react-native
side it works great because I just show it inside my renderer component with react-native-svg
. But the issue is that I also need a matter-js
physic body to have the same shape in order for physics to work correctly.
I tried using Matter.Bodies.fromVertices
method, but have a lot of issues during SVG conversion, so that was unsuccessful. I also found this guide https://www.codeandweb.com/physicseditor/tutorials/how-to-create-physics-shapes-for-phaser-3-and-matterjs, but it won't work because it is using Matter.Render
and I am using react-native-game-engine
instead.
So the question is how to render custom shapes and what is the preferable way to create them? Maybe tree-js
will fit better for that?