how to start creating a grappling hook in corona sdk ?
is it possible ?
thanks [import]uid: 106731 topic_id: 21838 reply_id: 321838[/import]
how to start creating a grappling hook in corona sdk ?
is it possible ?
thanks [import]uid: 106731 topic_id: 21838 reply_id: 321838[/import]
I think the max length of a USB cord is 6 feet, so it might not be so useful in the end. [import]uid: 120 topic_id: 21838 reply_id: 86759[/import]
@Bryan - hah.
@Rick - Yes, you could do this - there was a game late last year using something like this. It would be a matter of working out the best way to do it for your app, possibly using joints. [import]uid: 52491 topic_id: 21838 reply_id: 86791[/import]
thanks help
building the hook with a loop?
the idea is this?
my logic is right to start?
thanks again [import]uid: 106731 topic_id: 21838 reply_id: 86851[/import]
I wouldn’t be using a loop personally.
Here’s someone who previously did this and a bit of their code/logic; http://developer.anscamobile.com/forum/2011/06/09/pulley-joint-question [import]uid: 52491 topic_id: 21838 reply_id: 86863[/import]
this is what I was looking for, with this information I think I can work on what I want to do
thank for you time
[import]uid: 106731 topic_id: 21838 reply_id: 86868[/import]
No worries, best of luck with your project!
Peach
[import]uid: 52491 topic_id: 21838 reply_id: 86969[/import]
hi again
I do not know if my logic is correct but I’m trying to use touch joint and joint target
manipulating these two commands, i’s possible to grasp objects, correct?
would be possible to determine randomly with the touch, the position of the X axis and Y axis
instead of fixing where the touch joint must go
I was clear in my doubts?
hehehe
thanks again [import]uid: 106731 topic_id: 21838 reply_id: 87285[/import]
how can I implement the code below
clicking on the static box
the box that hits the ground
move to the static box and hanging on it
is it possible ?
display.setStatusBar( display.HiddenStatusBar ) – status telefone bateria sinal
local physics = require(“physics”)
physics.start()
physics.setDrawMode(“hybrid”)
weight = display.newCircle( 50 , 50 , 10 )
weight:setFillColor(25,24,25)
physics.addBody( weight, { density = 1.0} )
weight.myName = “weight”
weight.isVisible = true
weight.x = 50
weight.y = 100
weight2 = display.newCircle( 50 , 50 , 10 )
weight2:setFillColor(125,120,25)
–physics.addBody( weight2, { density = 1.0} )
physics.addBody( weight2, “static” )
weight2.myName = “weight2”
weight2.isVisible = true
weight2.x = 280
weight2.y = 100
local _W = display.contentWidth;
local _H = display.contentHeight;
–> Add the floor
local floor = display.newImageRect( “ground.png”,295,30 );
floor:setReferencePoint(display.CenterReferencePoint)
floor.x= _W/2
floor.y= _H+floor.height/8
floor.myName = “floor”
physics.addBody(floor, “static”,{friction = 1});
–myJoint = physics.newJoint( “pivot”, weight, weight2, 200,300 )
local function hook (event)
local body = event.target
local phase = event.phase
if “began” == phase then
body.catch = physics.newJoint( “pivot”, weight2, weight, event.x,event.y )
body.isFocus = true
elseif body.isFocus then
if “ended” == phase or “cancelled” == phase then
–weight:setLinearVelocity(1000, 0)
–weight.angularVelocity = 200
–weight:applyAngularImpulse( 100 )
–weight:applyTorque(2500)
–weight:applyLinearImpulse( 150, 500, weight.x, weight.y,180,500 )
–weight2:applyLinearImpulse( 0.1, 0, weight2.x, weight2.y )
end
end
end
weight2:addEventListener( “touch”, hook )
[import]uid: 106731 topic_id: 21838 reply_id: 87698[/import]