It didn't instantly nor after some docs reading occur to me whether you can actually scale/transform shapes on the fly.
For somehow after playing around a while with Löve my mind told me "Look Gnx you need to make monster, monster that when you shoot only executes more setMass() functions and its shape scales up in size!".
So perhaps this can be done, or would be something to be included in future versions?
Scaling/animating shapes?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Scaling/animating shapes?
I'm afraid you can't scale shapes after they have been created. This is a Box2D limitation, and I don't think the author has any plans of including this either.
You can attatch and remove shapes on the fly, of course, but "smooth" scaling of shapes is not feasible.
You can attatch and remove shapes on the fly, of course, but "smooth" scaling of shapes is not feasible.
Re: Scaling/animating shapes?
Meh
Though I guess the overhead wouldn't be terrible if I for looped shape destroys and attachs by unit?
Though I guess the overhead wouldn't be terrible if I for looped shape destroys and attachs by unit?
Re: Scaling/animating shapes?
What? That sentence did not compute.
Re: Scaling/animating shapes?
Speed thinking results in bad expression
Anyway I was thinking of hacking this by repeatedly destroying the shape attached to the body and attaching a new incrementally larger shape to the body (until reaching the desired size).
Anyway I was thinking of hacking this by repeatedly destroying the shape attached to the body and attaching a new incrementally larger shape to the body (until reaching the desired size).
Re: Scaling/animating shapes?
That could work, but would mean some overhead. Whether or not that is exceptable depends on the number of enemies on which you must do this.
Re: Scaling/animating shapes?
Yeah, that was what I was thinking too.Gnx wrote:Speed thinking results in bad expression
Anyway I was thinking of hacking this by repeatedly destroying the shape attached to the body and attaching a new incrementally larger shape to the body (until reaching the desired size).
I r awsum at looah
Who is online
Users browsing this forum: Ahrefs [Bot] and 5 guests