How can I enlarge my body radius with Matter Physics?
I’ve tried to use
.setCircle(some_radius,some_config)
method but sprite escapes to positions (0,0) and I don’t know if this is a good solution for performance reasons.
Is there a better way, and if not, why does sprite run to position (0,0)?
Can’t it be done? Really?
Darko
3
Do you mean body.circleRadius = value ?
I tried it. The radius increases, but collides as before the radius increased
Darko
5
Hi, sorry, I re-read your question and I guess the setCircle is ok, but try to pass the current position in the config params
Try…
body.setCircle(radius, {position: {x: body.x, y: body.y } })
Anyway I don’t play much with matter and about the performance, not sure
1 Like
Thanks for the help, it works, but unfortunately fps much drops every time I call this method. I think there must be another way
However, it’s not falling FPS, only the character loses velocity and stands still for a moment
There really is no method for such a simple thing?