Portals and Teleporting the Player
Posted: Tue Jul 30, 2013 1:40 am
Hello, all.
This is my first post here, and it's mostly due to the fact that I haven't needed to post a question before.
I am working on a game that I have mostly figured out in theory; however, I have run into a problem in implementing these portals. Basically, I want them to work like the ones from Portal: The Flash Version, but I can't figure out a good way of triggering the portals so that when an object is moved into Portal A, it comes out of A's linked Portal B. Obviously it should conserve velocity and make sure it is pointing in the right direction, but I can figure the math out on my own. My question is on how to create a portal that can act as a trigger - I have looked through the wiki, and it seems that Shapes' ability to act as a trigger was removed in 0.8.0. I can provide some code, if it is needed, but I think the code I have at the moment won't help to answer this much.
tl,dr: How do I make a shape/body using love.physics that can act as a trigger when a body touches it?
Thanks in advance,
Selenaut
This is my first post here, and it's mostly due to the fact that I haven't needed to post a question before.
I am working on a game that I have mostly figured out in theory; however, I have run into a problem in implementing these portals. Basically, I want them to work like the ones from Portal: The Flash Version, but I can't figure out a good way of triggering the portals so that when an object is moved into Portal A, it comes out of A's linked Portal B. Obviously it should conserve velocity and make sure it is pointing in the right direction, but I can figure the math out on my own. My question is on how to create a portal that can act as a trigger - I have looked through the wiki, and it seems that Shapes' ability to act as a trigger was removed in 0.8.0. I can provide some code, if it is needed, but I think the code I have at the moment won't help to answer this much.
tl,dr: How do I make a shape/body using love.physics that can act as a trigger when a body touches it?
Thanks in advance,
Selenaut