i have a ball. i have it so when you tap it it bounces. its ALL good. nice spinning and nice damping
HOWEVER i can’t make it bounce horizontally… only up and down.
i’ve seen the balloon video on youtube 6 times already but its not working for me.
basically i just want the ball to bounce in the opposite direction of where i’m touching it.
i’m sure theres a way of doing this
and BTW i don’t mean just up down left right. i want it to bounce like it would in the real world. up down ;eft right upper left, lower right, almost in the lower right, etc etc etc. basically real physics. the video seems to have done it not sure why i can’t replicate it…
here is my code…
local function onTap(event)
if “began” == event.phase then
beachball:applyLinearImpulse( 0 , -0.2, event.x, event.y )
elseif “ended” == event.phase then
end
end
beachball:addEventListener(“touch”, onTap)
i have it “onTap” because i don’t want infinite bounces, only on TAP (began)
can some one help me out? thanks! [import]uid: 91147 topic_id: 15482 reply_id: 315482[/import]