Hi, I’m new to corona sdk, here I have a video about steering a car. and i don’t really know how to do it in corona sdk, can anyone teach me how to do it?
https://www.youtube.com/watch?v=0hrmme6nQZg
Please help me
Thanks everyone.
Hi, I’m new to corona sdk, here I have a video about steering a car. and i don’t really know how to do it in corona sdk, can anyone teach me how to do it?
https://www.youtube.com/watch?v=0hrmme6nQZg
Please help me
Thanks everyone.
It looks to me like there is a touch handler on the whole screen. If the touch point is greater than 1/2 the screen width, then the car is getting some turn to the right. If it’s on the left half of the screen, then it gets some left steer.
Now beyond that, things get a bit murky, because if they could be using physics or just adding rotation.
Rob
what should i code if i wanna rotate my boxcar when I touch the 1/2 screen width to the left or right
local box = display.newRect (160,480,40, 60)
physics.addBody ( box, “dynamic”)
box.isFixedRotation = true?
what i meant to do it to rotate the car like the vedio did.
and move smoothly
ANYONE???
Because there are so may pieces to this, I doubt anyone can do this without writing it for you. You need to learn all the techniques needed to do that. I would recommend starting here:
http://coronalabs.com/resources/tutorials/getting-started-with-corona/
And going through the various tutorial, in particular the physics tutorials that would show you how to move things. You will likely need to know how to do things in the Runtime enterFrame event as well. You will probably need ideas from this as well:
http://coronalabs.com/blog/2014/02/04/tutorial-continuous-actions-in-corona/
Rob
It looks to me like there is a touch handler on the whole screen. If the touch point is greater than 1/2 the screen width, then the car is getting some turn to the right. If it’s on the left half of the screen, then it gets some left steer.
Now beyond that, things get a bit murky, because if they could be using physics or just adding rotation.
Rob
what should i code if i wanna rotate my boxcar when I touch the 1/2 screen width to the left or right
local box = display.newRect (160,480,40, 60)
physics.addBody ( box, “dynamic”)
box.isFixedRotation = true?
what i meant to do it to rotate the car like the vedio did.
and move smoothly
ANYONE???
Because there are so may pieces to this, I doubt anyone can do this without writing it for you. You need to learn all the techniques needed to do that. I would recommend starting here:
http://coronalabs.com/resources/tutorials/getting-started-with-corona/
And going through the various tutorial, in particular the physics tutorials that would show you how to move things. You will likely need to know how to do things in the Runtime enterFrame event as well. You will probably need ideas from this as well:
http://coronalabs.com/blog/2014/02/04/tutorial-continuous-actions-in-corona/
Rob