Problem with joint, using a platform with transition, during a collision event [Resolved]

Hi, well this is my first thread in the forum, I’ve been programming in CoronaSDK some time, but I ran into this problem and did not find much specific information, so I ask for your help.
I’ve been putting together a prototype for a mini game, using an environment similar to “Mario Bros” with horizontal and vertical platforms, but I have trouble joining the platform with the character, who first detected the colicion with the platform, but I can not do the joint.
I leave a video to see what the problem and performance.

http://www.youtube.com/watch?v=k2RGVhuK2XQ

PD: The movement of the characters I did by tracking the trail of touch, that I did for myself. If someone needs it, just ask.

thanks for the help.
greetings from chile.
sorry for bad writing
[import]uid: 88254 topic_id: 24084 reply_id: 324084[/import]

Hi, welcome to the forum!

One possible solution is discussed here: http://developer.anscamobile.com/forum/2011/12/23/any-platform-gurus-around

See if that helps :slight_smile: [import]uid: 52491 topic_id: 24084 reply_id: 97262[/import]

thanks for the reply, but apparently the code, is aimed at another problem, the static objects crossing in fact is similar to another use.

I’m still looking for the solution.
I managed to follow the trajectory of the platform, but to jump on it, the character “sticks” in the center of the platform, and that is way too forced by code.

Greetings Nko. [import]uid: 88254 topic_id: 24084 reply_id: 97318[/import]

Hi nko,

As far as I could see, you are using transitions to move the platforms, right? If so then that’s the cause of the problem. Try using physics instead. Make them kinematic and move them using:

platform:setLinearVelocity(10, 0) -> horizontally
platform:setLinearVelocity(0, 10) -> vertically

br,
Cleverson [import]uid: 79136 topic_id: 24084 reply_id: 97325[/import]

Thanks for the reply. As the saying goes “The simplest explanation and efficient, usually is the right thing”.

I used “transition.to” because it could generate a “cycle” between two functions, but the solution with timer looks like this … and increasing the friction of the platform.

 physics.addBody( plataformaRoja,"kinematic",plataformBody )   
  
 local function SwRojoAction()  
 local function SwRojoActionSecundaria()  
 function waitToMove(event)  
 plataformaRoja:setLinearVelocity(0, 0)  
 timer.performWithDelay(1000,SwRojoAction)  
 end  
 plataformaRoja:setLinearVelocity(80, 0)  
 timer.performWithDelay(2000,waitToMove)  
 end  
  
 function waitToMove(event)  
 plataformaRoja:setLinearVelocity(0, 0)  
 timer.performWithDelay(1000,SwRojoActionSecundaria)  
 end  
 plataformaRoja:setLinearVelocity(-80, 0)  
 timer.performWithDelay(2000,waitToMove)  
 end  

I have a small difference in distance, but it is probably due to the size of the platform. Well thanks for your help.

Greetings Nko. [import]uid: 88254 topic_id: 24084 reply_id: 97585[/import]