Need to make a swaying flower?

Monkey Forums/Monkey Programming/Need to make a swaying flower?

CopperCircle(Posted 2012) [#1]
Hi, I need to create a simple flower & stem that sways and can be affected by force, i'm think Box2D, any other ideas?

Thanks.


Samah(Posted 2012) [#2]
There's a zombie on your lawn...


therevills(Posted 2012) [#3]
We don't want zombies on our lawn...


Samah(Posted 2012) [#4]
On a serious note, you should be able to do it with a spring in Box2D. I have very little experience with it since I've only really used Chipmunk, and that was ages ago.


CopperCircle(Posted 2012) [#5]
Thanks, I'll have to mow my lawn!


CopperCircle(Posted 2012) [#6]
I have got something basic working in box2d, does anyone know how you get the x,y and r of each fixture in a collection of joints, like the bridge demo?

I need to draw an image over each part.

Thanks.


muddy_shoes(Posted 2012) [#7]
Look at b2World.DrawDebugData().


CopperCircle(Posted 2012) [#8]
Thanks Mr shoes your Box2D implementation is great and I am getting to slowly know my way round it.

I am putting together a helper module that includes a loader for http://www.physicseditor.de/ will release it for others when it does somthing useful.


CopperCircle(Posted 2012) [#9]
Right I have a stem made from a vertical bridge of joints that works quite well, but to get it to sway I need to move the anchors? I can't seem to find a way to affect them?

Thanks.


NoOdle(Posted 2012) [#10]
I think you would need to apply a force to a joint to make it move.


CopperCircle(Posted 2012) [#11]
Thanks, sorted it now, I had to remove one of the end joints so it could sway about.