In my rpg-styled (top-down perspective) 2d game, I want my player to be at the center of the screen, while the entire world moves, giving the effect of player movement. I can make that, but my problem is at the edges of the game-world, I want the world to stop moving and the player to move.
64445
I am making a game similar to Legend of Zelda: Link to the Past (top-down 2D action-adventure). I want the character to stay centred on the screen when he moves.  Currently, whenever the player wants to move, I move all of the map in the opposite direction. This works, but as I add more objects to the world, moving them all gets more complicated.  Is there a better way of approaching this?
36458
I want to make a 2D game that is basically a physics driven sandbox / activity game. There is something I really do not understand though. From research, it seems like updates from the server should only be about every 100ms. I can see how this works for a player since they can just concurrently simulate physics and do lag compensation through interpolation.  What I do not understand is how this works for updates from other players. If clients only get notified of player positions every 100ms, I do not see how that works because a lot can happen in 100ms. The player could have changed direction twice or so in that time. I was wondering if anyone would have some insight on this issue.  Basically how does this work for shooting and stuff like that?  Thanks
110851
I want to create a motion trail effect for a sword like known in games look at that example if you have an solution that looks not as fancy as in the picture don't mind to post it. I'll accept anything useful.
64556
I would like to have my object transparent, with a color only on the edges, would someone know how to do this? I am starting with the nodes, if anyone can help with some guidelines I would really appreciate ;-)  EDIT:  I was looking for something like the hand in Kinectimals :    Thanks
89675
I think there is a way to do an inside radius, and an outside radius, but how? I want to have a spawnpoint, where @a[r=30] is in gamemode a, and everyone outside is gamemode s. How would I write this?
106151
My background and gameobjects are 2d sprites not UI images ,I want to know how to make my background scale with screen size and positions of 2d sprits on it don't change after building game (webGl) like scale canvas with screen size and anchor points in UI elements .  Before building the game   After building
50456
I'm using an older Nvidia chip that hates running viewport renders, and I need to check if changes to the materials on a few objects not far from the center of my scene are (I'm rendering a floorplan with an orthographic camera from above, so I'm looking down on objects and want to check if the displacement materials are working correctly).  Is there any way to select a bit of the image and have it render first or without having to render the rest of the image? I'm aware that you can tell the image to render from an edge, but my stuff's about equidistant from either side of the scene.
121278
I had a player who wanted to help someone else stand up before his turn starts so he can reach the enemy. Is this written in the D&amp;D 5e rules? If not, how would you rule this?  I am thinking of using the helping character's movement instead.
79472
Well I have a simple 2D game where all positions are defined by and X and Y coordinate.  There are objects moving at a constant velocity. And a turret fires a bullet at the X and Y coordinates of the object. By the time the bullet goes to the desired area, the object has already moved.  So i need to adjust the X and Y target positions for the turret to shoot at taking into account the bullet speed and object speed.  Here's an image showing the problem.
59196
In my scene I have a camera sitting at the origin. I would like to contraint it so that it always looks at the center of a given object. But the camera should not change its position.  I found some answers using a "TrackTo" or "LockedTrack" constraint but could not manage to make it work.  Could I probably use a Driver for this and if yes, how can I adjust it?  Thanks in advance!
111334
I am looking for a conceptual solution to my problem. It's a simple platformer-alike game where player can move horizontally during free-fall.  Consider those two cases:   In the first case, from game experience point of view, the player should land on top of the box; and in the other case he hit the left edge, hence the player should fall down.  However, from my code point of view ("real behaviour"), both those collision detection cases are identical. I am not sure how to separate them.   In both cases the vertical velocity is positive (falling down) and the user is moving with some fixed positive horizontal velocity. (moving right)  From a collision-standpoint the two cases are identical, I think. How can I tell whether I should put the player on top of it or let him fall?
83279
Whenever I'm running or playing a game, I consistently run into an issue of setting atmosphere. I've realized the best way to do this is through more effective, engaging descriptions of settings, actions, and objects that the characters see and feel.  As a player, I feel that my actions are generally "I attack the goblin," or some variation thereof, but I'm afraid that I'll stumble over my words and further confuse the other players and I'll resort to "I attack the goblin" as to not drag the game out longer.  As a DM, my issue tends to be more with setting atmosphere with settings, locations, and objects. Effectively, the flavor texts that comes with walking into some amazing location that the characters (not necessarily the players) should be suitably impressed by. My goal here is to engage the players with some degree of spectacle, and be more inquisitive in their environment and whatever lies within it.  How can I create more descriptive, concise flavor text for the games I play in?
57743
I am following through the exercises in BlenderBasics_4thEdition2011.pdf and have gotten to the section on texturing.  The book goes through the creation of a Lighthouse and now I am texturing it.  I want to have a closeup view of the roof of the lighthouse after partitioning it as the lesson describes on page 54.    In order to get a close up view I selected the roof and want to center the screen on the vertices of it so I pressed the Numpad . key.  When I do that the view zooms so that the roof is off the screen.    What am I am doing wrong?    I tried Ray's answer and was able to move the origin but pressing the Numpad . key still did not work.  The centering was still on the bottom of the lighthouse, as if the origin was still there.
102091
I am attempting to make a top down game similar to the SNES Zelda games, in Unity 4.3, in 2D. When my character swings their sword, every enemy within a radius takes damage. I want to make sure that melee attacks only damage enemies the player is facing.  How can I do this?    The relevant code in PlayerAttack.cs looks like this:  // Update is called once per frame void Update () {     // have the player initiate an attack on the object     if(Input.GetKeyUp(KeyCode.F)){         MeleeAttack();     } }  private void MeleeAttack(){     // create a variable called distance to make sure the distance is close enough     // to inflict damage from a melee attack target.transform.positon = the position     // of the object to attack and transform.position is the position of the players     // transform     float distance = Vector3.Distance(target.transform.position, transform.position);      // make sure the distance is not greater than 1.5 so the player cannot     // melee an enemy from to far away     if(distance &lt; 1.5f){             // get a reference to the enemy's health script and type cast it.             EnemyHealth eh = (EnemyHealth)target.GetComponent("EnemyHealth");             // now call the function that will decrease the enemy's health             eh.AdjustCurrentHealth(-10);     } }
18623
Hello everyone I have this problem that I have tried everything I could think of. The problem: I am making a 2D game with parallax effect but I am using 3d space so am not simulating the parallax but letting the perspective projection take care of it for me. now the problem i have my own game editor where I design the levels, in this editor I use just images and I set a Z value for each layer. however I want the layers to show in the game engine exactly as I set them in the game editor, in short I want perspective projection to do parallax but without changing their scale or offset/position.  obvious solution is to scale them up and offset them but the problem how to calculate their offset? with scaling I tried object->Scale(object.Z/view.Z) and seems to return them to their real size but their positions are still wrong. I tried object->setPositionX(object->getPosition().x*(object.Z/view.Z)) and seems to be aligned except they all seems shifted.  I have tried unprojecting and tried to convert from world matrix to screen matrix and find some ratios and so on.  If anyone have any idea or anyway how this could be done in an elegant/mathematical way , I will be most grateful.  Thank you all in advance.
48565
I found out about this using a debug renderer. When the game starts, everything is in order. But when a collision happens, the sprite's rotation is way larger than its body. The sprite and body match when the body is completely horizontal.    The sprite's rotation origin seems far distant from where it should be. Here's my code:  Sprite sprite = data.sprite; position = body.getPosition(); sprite.setPosition(     position.x - sprite.getWidth()  / 2,     position.y - sprite.getHeight() / 2 ); sprite.setOrigin(position.x, position.y); sprite.setRotation(MathUtils.radiansToDegrees * body.getAngle());   As you can see, I am even trying to set center of its rotation with setOrigin without success. How can I fix this?
31165
Perhaps a reference video would be needed to show this, but to clarify, merely the portal and its animations appear nearly impossible to create, the frame itself is simple diffusion and optional reflection. Mind this is using cycles.   I though the best way to attain this would be to have the position of the camera changing cause a movement of the portal textures however it has proven futile.  And so I ask, is this possible in Cycles?  EDIT:  My original plan was to use the UV Warp modifier to create the movement effect, with several planes underneath each other to create the depth. However, the way it appears to be a void, another area is the piece I lack.   The frame of the portal, again, is not a problem.  In reference to a comment that referenced a similar concept using a Nether portal that showed the Nether upon the other side, is similar, however there is no need to create another world on the other side, as I want to stay true to the visual mechanics of Minecraft.  Here is an example of the in-game version of what the goal is.