shadmar Posted July 19, 2013 Share Posted July 19, 2013 I was going to enter the one week game project Aggror started, but I realized I only had 2 evenings to work on it this week, so maybe next time The portals render their counterpart views using two buffers and the regular diffuse.shader. I use camera:pick to place portals on the walls or roof/floor. When App.player collides with one of them I move player, and set camera orientation to the portal orientation, so all good.. My problem is : If I step through the portal I get collision in rapid succesion since player is moved between the portals every frame since collision occur immediatley after player is moved. So I havent figured out a smooth way to solve this, any tip would be appreciated. 4 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Furbolg Posted July 19, 2013 Share Posted July 19, 2013 How about a simple boolean variable for each portal that is changed after the player stopped colliding ? Quote Link to comment Share on other sites More sharing options...
Admin Posted July 19, 2013 Share Posted July 19, 2013 That is so cool. I might consider a callback to discard specific collisions, just to support this. Quote Link to comment Share on other sites More sharing options...
Rick Posted July 19, 2013 Share Posted July 19, 2013 I always thought we needed OnCollideEnter, OnCollideLeave which might help with this and many other things as well. Maybe chaining multiple collides can work. It's like having 2 lasers at the entry of a door. By telling which one breaks first and which one breaks second you can tell which way someone is going. If you are coming out from a portal you don't trigger the teleporting logic. If you are going into a portal you trigger the teleporting logic. Quote Link to comment Share on other sites More sharing options...
Admin Posted July 19, 2013 Share Posted July 19, 2013 What you need to do is have two player entities. For each one, discard collisions that lie on the wrong side of your portal plane (which requires me to add a new callback). Then take the average resulting position and force them both to that. This guy does some insane things using that technique: 1 Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted July 19, 2013 Share Posted July 19, 2013 I always wondered who would be the first person who would make a good attempt on portals. It looks really cool already Shadmar And btw, you can simply submit this for the game week tournament if you wish. Prototypes , level designs etc are just as welcome as small games. Quote Link to comment Share on other sites More sharing options...
shadmar Posted July 19, 2013 Author Share Posted July 19, 2013 Thanks for the tip on the 2 player entity idea, it sounds like it could work. I'll upload my project when I'm back from my trip (wednesday) Thanks. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.