Hey all,
I have been working on a side-scroller using Corona and LD. LD is great and once you get accustomed to it it’s very powerful and easy to use.
I am having trouble implementing joints into my game. First off all, I want to work with a pivot joint. (seems like rope joints dont work yet - or they don’t have collision detection) somewhat similar to the Corona Chains example. I need a rope that has collision detection. I have created the kind of joint I need using pure Corona. ie. fixed at one end while the other end experiences gravity and swings… it the rope attaching the 2 objects collides with another object then the trajectory is articled as the rope deforms around the object it collided with)
Now I want to set up these joints with objects loaded through LD.
Background: The rope will work as a grappling hook from a player to objects. I thought about having a generic joint floating around off screen in my Level and then changing it’s target when necessary. (Similar to how a bullet may work or the bird poo in potty bird). The strange thing is when i try to add a joint to my level nothing happens. I can’t add a joint object. I click on the add joint and i click on my layer and no joint object appears.
So not knowing if this floating joint idea will work (I actually need a series of pivot joints that are linked together (think chains example) with one end connected to the player and other to an object in the level) and not being able to make a joint in LD… I figured I could make the joint in pure Corona and then add it to the game this way… outside of the level editor. Two things i am unsure about and hence my questions are:
-
Can you add a graphics objects loaded through corona and not the LD to the same viewGroup as the Level? ie. can you easily draw over the level without messing with it too much? if so can you point me in the right direction to this?
-
Is the physics loaded through LD and the level compatible with the physics of objects I load outside of the Level. Ie. can I program joints in pure Corona that work with objects loaded through the LD. ie. collision detection and joint objects.
I am only wondering if anyone has tried (and succeeded?) with any of this or if it is even possible? I know that my other option is to play around with the LD library and edit it around my needs.
Any help or suggestions would be greatly appreciated.
Examples I would be looking for would be how to add a graphics object through corona and no the LD and have it interact in some way with an object loaded with LD… or have it draw "over top: of the level.
Maybe someone may be able to tell me why my joint button does not seem to work in LD? (this could be plain ignorance)
Lastly, joints programmed outside of the LD being used with LD objects… possible? yes/no? any possible avanues to check out on how to do this.
Thanks in advance.
Patrick