How can i slow the speed down of a randomly moving static object?

i know how to change the speed of an object along a certain axis.  Not sure if the same rules apply?  Is it changed within the argument?  I would like to slow down ghost 2 and 3 in the following code:

Thanks

Blake

-- Your code here local physics = require "physics" physics.start() physics.setGravity(0,0) --physics.setDrawMode( "hybrid" ) local pacmanghost1 = display.newImageRect( "pacmanghost1.png", 30, 30 ) pacmanghost1 : setFillColor(10, 0, 0) pacmanghost1.x = 160 pacmanghost1.y = 200 --pacmanghost1 : scale(.10, .10) physics.addBody( pacmanghost1, "dynamic") local pacmanghost2 = display.newImageRect("pacmanghost2.png", 30, 30) pacmanghost2.x = 200 pacmanghost2.y = 300 --pacmanghost2 : scale(.10, .10) physics.addBody(pacmanghost2, "static") local pacmanghost3 = display.newImageRect("pacmanghost3.png", 30, 30) pacmanghost3.x = 250 pacmanghost3.y = 400 pacmanghost3 : setFillColor(0, 10, 0) --pacmanghost3 : scale(.10, .10) physics.addBody(pacmanghost3, "static") function touchScreen ( event ) if event.phase == "began" then transition.to(pacmanghost1, {time=1000, x=event.x, y=event.y}) end end Runtime : addEventListener ("touch", touchScreen) --transition.to(pacmanghost1, {x=250, y=250, time=10000}) --local text = display.newText( "Blake's", 160, 200, "Arial", 60 ) --local text = display.newText( "Arcade", 160, 300, "Arial", 80 ) function movepacmanghost2() transition.to(pacmanghost2, {time=1000, x=math.random(20, 290), y=math.random(10, 500), onComplete=movepacmanghost2}) transition.to(pacmanghost3, {time=1000, x=math.random(20, 290), y=math.random(10, 500), onComplete=movepacmanghost3}) end movepacmanghost2() function onCollision ( event ) print("collide!") pacmanghost1 : removeSelf() end Runtime : addEventListener ("collision", onCollision)

Huh?  Static objects are by definition not moving.  

Moving a static object with a transition will NOT give you the results you expect.

Better to use dynamic objects moving via physics.  Or at the very least if you insist on using transitions, make the moving objects: dynamic AND sensors.

https://docs.coronalabs.com/daily/guide/physics/physicsBodies/index.html

Might be wording it wrong or not relaying my code clearly.  ghost 2 and 3 are currently moving randomly within a set x and y axis.  physics is applied and i currently have them both as static.  i thought that by making them static i was inhibiting them from reacting with each other and they would only react to a dynamic object such as ghost 1.  i know that if all objects are static there can be no collisions.  maybe ive somehow over ride the static condition? what i am hoping to do is slow the movement of ghost 2 and 3 so ghost 1 can escape quicker to avoid collisions. code is above.

thanks

blake

does this link make sense for what im trying to accomplish?http://appajuice.blogspot.com/2013/06/random-movement-corona-sdk.html?m=1thanks blake

Huh?  Static objects are by definition not moving.  

Moving a static object with a transition will NOT give you the results you expect.

Better to use dynamic objects moving via physics.  Or at the very least if you insist on using transitions, make the moving objects: dynamic AND sensors.

https://docs.coronalabs.com/daily/guide/physics/physicsBodies/index.html

Might be wording it wrong or not relaying my code clearly.  ghost 2 and 3 are currently moving randomly within a set x and y axis.  physics is applied and i currently have them both as static.  i thought that by making them static i was inhibiting them from reacting with each other and they would only react to a dynamic object such as ghost 1.  i know that if all objects are static there can be no collisions.  maybe ive somehow over ride the static condition? what i am hoping to do is slow the movement of ghost 2 and 3 so ghost 1 can escape quicker to avoid collisions. code is above.

thanks

blake

does this link make sense for what im trying to accomplish?http://appajuice.blogspot.com/2013/06/random-movement-corona-sdk.html?m=1thanks blake