Putting shapes inside a circle for a "googly eye" effect

I trust everyone knows what googly eyes are?
if not, look at the picture here: http://en.wikipedia.org/wiki/File:Googly.jpg

on with the problem…
I wrote a quick code:
[lua]local physics = require( “physics” )
physics.start()

test = display.newImage(“test.png”,150,200)

ball = display.newCircle(400,400,50,100)

physics.addBody( test, “static”)

physics.addBody( ball)[/lua]

I hoped the circle would stay in the image (which is hollow) but the image “kicks” out the circle…
seen here: http://screensnapr.com/v/ldwoW4.png
so obviously it does not work.

any way around this? [import]uid: 79135 topic_id: 14418 reply_id: 314418[/import]

no edit button -.-

just thought I have physics editor! might work. [import]uid: 79135 topic_id: 14418 reply_id: 53356[/import]

me again.
sorted it, using joints. sorry about that :confused:

http://screensnapr.com/v/McNvqq.png (if you want to see) [import]uid: 79135 topic_id: 14418 reply_id: 53365[/import]

Instead of physics, why do you not connect it to the accelerometer and move them accordingly?

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 14418 reply_id: 53368[/import]

might be a good idea for later, but atm I enjoy watching his eyes go crazy ever bounce! [import]uid: 79135 topic_id: 14418 reply_id: 53369[/import]

so did it work for you or are you still looking for a solution?

the other option is to create an octagonal boundary around it which is invisible and the circle is just for the show.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 14418 reply_id: 53371[/import]

I like the way I did it, cause I learnt :slight_smile:
would be better if the joint was more like rope - moveable, then the eyes would be crazier xD [import]uid: 79135 topic_id: 14418 reply_id: 53372[/import]

Hi

Did you find a solution for this? I have tried to accomplish the same, but with no luck. How did you accomplish this? :slight_smile:

Best Regards

Se460 [import]uid: 122802 topic_id: 14418 reply_id: 97076[/import]