Tag Info

New answers tagged


thank you for your answer. I've implemented the portal in my game. I use OverlapArea to check if there are objects near the portal and duplicate them to next portal. And if the objects leave the portal, I delete all objects that are not visible by the camera. You can see the effect here.


My solution would me to create 2 identical objects that are spaced apart by the width of the screen.So when the first object is in the middle of the view (for example left one), the other object would be screen width apart from the first object i.e. off the view. When you move the first object the second one moves along with that object, keeping the space ...


While the character is running, mark the surface that he's running on as the active running surface. As long as the speed does not reduce to 0 (or reduced, depending on your mechanics), you're on the same surface, no matter if the head touches another surface. To detect where you go next, if your surface is stored as a grid, store last grid cell that you ...


You can use the dot product of a world up vector with an up vector relative to the player. If both of these vectors are normalized, you're results will be between 1 and -1. With 2d vectors the dot product is calculated by taking the product of the x components and adding them to the product of the y components. Given the vectors A = (x,y) and B = (X,Y). ...


You could have two collision sensors: one just under the character's feet and one just over it's head. Then it would be a matter of checking the positions of both sensors when they are both triggered and if the foot sensor is higher than the head sensor then you know that the body is upside down.


If your room take up the whole game screen (a bit like your image), there not much you can do, because you do need to have part of that orange circle both on the left and on the right of the screen. If your world is large and you platformer center its view on the character, there's more hope. Let's say your world has a width of h. For example, split your ...

Top 50 recent answers are included