Search Results

Search found 3988 results on 160 pages for 'collision resolution'.

Page 30/160 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Why does the player fall down when in between platforms? Tile based platformer

    - by inzombiak
    I've been working on a 2D platformer and have gotten the collision working, except for one tiny problem. My games a tile based platformer and whenever the player is in between two tiles, he falls down. Here is my code, it's fire off using an ENTER_FRAME event. It's only for collision from the bottom for now. var i:int; var j:int; var platform:Platform; var playerX:int = player.x/20; var playerY:int = player.y/20; var xLoopStart:int = (player.x - player.width)/20; var yLoopStart:int = (player.y - player.height)/20; var xLoopEnd:int = (player.x + player.width)/20; var yLoopEnd:int = (player.y + player.height)/20; var vy:Number = player.vy/20; var hitDirection:String; for(i = yLoopStart; i <= yLoopEnd; i++) { for(j = xLoopStart; j <= xLoopStart; j++) { if(platforms[i*36 + j] != null && platforms[i*36 + j] != 0) { platform = platforms[i*36 + j]; if(player.hitTestObject(platform) && i >= playerY) { hitDirection = "bottom"; } } } } This isn't the final version, going to replace hitTest with something more reliable , but this is an interesting problem and I'd like to know whats happening. Is my code just slow? Would firing off the code with a TIMER event fix it? Any information would be great.

    Read the article

  • How to handle circle penetration

    - by Kaertserif
    I've been working on cirlce to circle collision and have gotten the intersection method working correctly, but I'm having problems using the returned values to actually seperate the circles from one another. This is the method which calculates the depth of the circle collision public static Vector2 GetIntersectionDepth(Circle a, Circle b) { float xValue = a.Center.X - b.Center.X; float yValue = a.Center.Y - b.Center.Y; Vector2 depth = Vector2.Zero; float distance = Vector2.Distance(a.Center, b.Center); if (a.Radius + b.Radius > distance) { float result = (a.Radius + b.Radius) - distance; depth.X = (float)Math.Cos(result); depth.Y = (float)Math.Sin(result); } return depth; } This is where I'm trying to apply the values to actually seperate the circles. Vector2 depth = Vector2.Zero; for (int i = 0; i < circlePositions.Count; i++) { for (int j = 0; j < circlePositions.Count; j++) { Circle bounds1 = new Circle(circlePositions[i], circle.Width / 2); Circle bounds2 = new Circle(circlePositions[j], circle.Width / 2); if(i != j) depth = CircleToCircleIntersection.GetIntersectionDepth(bounds1, bounds2); if (depth != Vector2.Zero) { circlePositions[i] = new Vector2(circlePositions[i].X + depth.X, circlePositions[i].Y + depth.Y); } } } If you can offer any help in this I would really appreciate it.

    Read the article

  • How to accommodate for the iPhone 4 screen resolution?

    - by dontWatchMyProfile
    This is a programming question! Read on before you vote to close! According to Apple, the iPhone 4 has a new and better screen resolution: 3.5-inch (diagonal) widescreen Multi-Touch display 960-by-640-pixel resolution at 326 ppi This little detail affects our apps in a heavy way. Most of the demo apps on the net have one thing in common: They position views in the believe that the screen has a fixed size of 320 x 480 pixels. So what most -if not all- developers do is: They designed everything in such a way, that a touchable area is -for example- 50 x 50 pixels big. Just enough to tap it. Things have been positioned relative to the upper left, to reach a specific position on screen - let's say the center, or somewhere at the bottom. Edit: It seems Apple has integrated an switch that allows to tell if an app is highRes or not. Nice. When we develop high-resolution apps, they probably won't work on older devices. And if they do, they would suffer a lot from 4-times the size of any image, having to scale them down in memory.

    Read the article

  • What's the best way to implement one-dimensional collision detection?

    - by cyclotis04
    I'm writing a piece of simulation software, and need an efficient way to test for collisions along a line. The simulation is of a train crossing several switches on a track. When a wheel comes within N inches of the switch, the switch turns on, then turns off when the wheel leaves. Since all wheels are the same size, and all switches are the same size, I can represent them as a single coordinate X along the track. Switch distances and wheel distances don't change in relation to each other, once set. This is a fairly trivial problem when done through brute force by placing the X coordinates in lists, and traversing them, but I need a way to do so efficiently, because it needs to be extremely accurate, even when the train is moving at high speeds. There's a ton of tutorials on 2D collision detection, but I'm not sure the best way to go about this unique 1D scenario.

    Read the article

  • Dual Monitors for Windows 8

    - by antonio081014
    I have one monitor and a projector connecting to my computer, while the screen keep flashing after every 10 seconds, it seems the resolution keeps changing. The project is the a dual display for the monitor. They displays the same content. My current resolution is 1024*768, while after 10 seconds around, the resolution goes to something big, then after a few seconds, it goes back to 1024*768. I wonder if this is a problem about the resolution, or it's about the compatible of screen display?

    Read the article

  • How can I make PDFs appear life-size when displayed at 100%?

    - by ændrük
    When I open a letter size PDF and then zoom to 100%, the page physically displayed on my monitor is smaller than a real letter size sheet of paper. How can I make "100%" on the computer screen correspond with "100%" in real life? Details This message suggests that I should be investigating the system-wide DPI settings for my monitor. xdpyinfo reports: dimensions: 1024x768 pixels (271x203 millimeters) resolution: 96x96 dots per inch My monitor has a native display resolution of 1024x768 pixels and a diagonal display size of 12.07 inches. PX CALC returns the following information: DPI: 106.05 Dot Pitch: 0.2395mm Size: 9.66" × 7.24" (24.53cm × 18.39cm) What I've tried so far Running xrandr --dpi 106.05 successfully caused my PDF to appear actual size at 100%, but this effect was lost after rebooting. To make the setting persistent I tried creating the following /etc/X11/xorg.conf: Section "Monitor" Identifier "ThinkPad X60 LCD" DisplaySize 245 183 EndSection Section "Screen" Identifier "Screen0" Monitor "ThinkPad X60 LCD" EndSection After re-logging in, /var/log/Xorg.0.log contained [ 1167.824] (**) intel(0): Display dimensions: (245, 183) mm [ 1167.824] (**) intel(0): DPI set to (106, 106) but xdpyinfo still reported dimensions: 1024x768 pixels (271x203 millimeters) resolution: 96x96 dots per inch and "100%" still appeared too small. Link to XRANDR wiki Link to making XRANDR changes persistant

    Read the article

  • Use TV (hdmi) with non-square pixels

    - by labsin
    I am having a problem when I connect my LG plasma tv (with a native resolution of 1024x768 pixels) to my 12.04 laptop. The pixels (actual pixels, not the signal) of my TV are stretched so it gets his 16:9 ratio. The pixels are rectangular (1.3333x1). Everything I display from my laptop oviously get stretched (4:3 stretched to 16:9). There is a different dpi in X and Y needed for it to display properly (some kind of anamorphic mode). Default Ubuntu uses a dpi of 96x96. I can change it using xrandr, but only square eg 100x100 or 70x70. Already looked here, but it seems Ubuntu totally ignore the displaySize in xorg.conf When I use the code below to see the dpi and nothing I do changes it. The displaySize also stays the same (calculated using 96 dpi and the resolution) xdpyinfo | grep -B2 resolution I use the propretary ATI drivers for my ATI Mobility Radeon HD 50xx but it is the same with the Radeon drivers. My temporary solution is to use: xrandr --output DFP1 --mode 1024x768 --scale 1.333333333333x1 --output LVDS --off But with this the right side of the screen is nog accesable. This is a known problem with xrandr --scale and ubuntu. This is because of a patch for the mouse/windows not going outside the screen. I search a way to change the DisplaySize or the dpi(to something not square like 128x96) when I connect the display.

    Read the article

  • How to force Multiple Monitors correct resolutions for LightDM?

    - by Hanynowsky
    I am affected by the BUG: https://bugs.launchpad.net/ubuntu/+source/unity-greeter/+bug/874241 Otherwise, if like me you have a laptop connected to a second monitor of higher resolution, LIGHTDM at the login stage, mirrors the displays in both screens and assign to them a common resolution (1024X768) in my case, instead of extending the desktop (Primary screen with the greeter and secondary with just a logo as mentioned in the Multiple Monitors UX specifications book for 12.04). Here is my xrandr -q @L502X:~$ xrandr -q Screen 0: minimum 320 x 200, current 1920 x 1848, maximum 8192 x 8192 LVDS1 connected 1366x768+309+1080 (normal left inverted right x axis y axis) 344mm x 193mm 1366x768 60.0*+ 1360x768 59.8 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 287mm 1920x1080 60.0*+ 1600x1200 60.0 1680x1050 60.0 1280x1024 60.0 1440x900 59.9 1280x960 60.0 1280x800 59.8 1024x768 60.0 800x600 60.3 56.2 640x480 60.0 DP1 disconnected (normal left inverted right x axis y axis) I tried to force lightdm to execute some xrandr commands in order to set the right resolution for each monitor and extend the desktop, but I get a LOW GRAPHICS MODE ERROR (You're running in low graphics mode, your screen, input devices...did not get detected..) I created a simple script named lightdmxrand.sh: #!/bin/sh xrandr --output HDMI1 --primary --mode 1920x1080 --output LVDS1 --mode 1366x768 --below HDMI1 And told lightdm to run it : /etc/lightdm/lightdm.conf [SeatDefaults] greeter-session=unity-greeter user-session=ubuntu greeter-setup-script=/usr/bin/numlockx on display-setup-script=/home/hanynowsky/lightdmxrandr.sh Someone knows what is wrong!? Thanks in advance.

    Read the article

  • Ubuntu 12.10 on Acer Aspire S3: screen resolution

    - by sashkello
    I'm new to linux and recently installed Ubuntu 12.10 alongside Windows on my laptop. Initially 3D screen effects (i.e., Docky) were not working and I tried different things like installing and reinstalling nvidia-current, compiz etc... Now I think I messed up the display drivers completely... Although all the effects are now working, I can't get any screen resolution other than 640x480. Can anyone please tell me how to find out exactly what's wrong and ways of fixing it?

    Read the article

  • 12.04 display resolution changes after each reboot

    - by user72469
    I am running 12.04-64bit on a Dell xps15z and the resolution changes after each reboot to 1024x768 .As a result my desktop occupies just 3/4 of my entire screen...I have to manually adjust it through the display option to the max 1366x768 in order for the desktop to occupy the whole display!If you add this to the "system problem detected" that pops up every day I cannot hide my dissatisfaction and frustration about 12.04...

    Read the article

  • Second Monitor Unable to Display at any Resolution

    - by Ryan Sharp
    After connecting the second monitor, the only way to get it to work is with 'mirror', which isn't what I want it for. If I select a display resolution for it, I get the following error: requested position/size for CRTC 148 is outside the allowed limit: position=(1908, 0), size=(1024, 768), maximum=(1920, 1920) I'm on 12.04, with AMD HD Radeon 6950, Post-update drivers. I appreciate anybodies help with this. Thanks.

    Read the article

  • Image Resolution FAQ

    In today';s world it is important to understand image resolution and size, the basics are fairly easy to get to grips with but the intricacies can be incredibly complex. The article this week has been... [Author: Chris Holgate - Computers and Internet - June 15, 2010]

    Read the article

  • How to detect collisions between sprite and a user generated shape of some sort?

    - by Huwell
    How to detect a collision between a sprite and a user generated shape of some sort. For example. There are some objects on the screen. The user takes their finger and draws an circle shape around a object (The selection rule is painting circle around the sprite, but the painting shapes may be various). I need to detect which object selected, which just like: (demo images) http://i52.tinypic.com/28h0t1g.png

    Read the article

  • Voronoi regions of a (convex) polygon.

    - by Xavura
    I'm looking to add circle-polygon collisions to my Separating Axis Theorem collision detection. The metanet software tutorial (http://www.metanetsoftware.com/technique/tutorialA.html#section3) on SAT, which I discovered in the answer to a question I found when searching, talks about voronoi regions. I'm having trouble finding material on how I would calculate these regions for an arbitrary convex polygon and aleo how I would determine if a point is in one + which. The tutorial does contain source code but it's a .fla and I don't have Flash unfortunately.

    Read the article

  • Detect click on Triangle and Circle buttons

    - by chr1s89
    How can i detect clicks on a texture (will be a button in my game) that has a form of a triangle or circle. I know only the rectangle solution where u can use the positions + the width/height but this dont work for that because clicks will be detected at the transparent pixels. I heard of pixel-perfect collision is it the right way for this? It would be great if someone can give me a example for such a solution or other.

    Read the article

  • How do I add a Rigid body and a box collider component to a Texture2D?

    - by gamenewdev
    I am making a snake game. I'm basing it on a basic tutorial game, which does no collision detection, wall checking or different levels. All snake head, piece, food, even the background is made of Texture2D. I want the head of the snake to detects 2D collisions with them, but Rect.contains isn't working. I'd prefer to detect collisions by onTriggerEnter() for which I need to add BoxCollider to my snakeHead.

    Read the article

  • XNA - Detect click on triangle/circle form of a texture

    - by chr1s89
    How can i detect clicks on a texture (will be a button in my game) that has a form of a triangle or circle. I know only the rectangle solution where u can use the positions + the width/height but this dont work for that because clicks will be detected at the transparent pixels. I heard of pixel-perfect collision is it the right way for this? It would be great if someone can give me a example for such a solution or other.

    Read the article

  • way to do if(x > x2) x = x2 with rotation?

    - by CyanPrime
    Alright, so I got this walking code, and some collision detection, now the collision detection returns a Vector3f of the closest point on the triangle that the projected position is at (pos + move), so then I project my position again in the walking method/function and if the projected position's x is the nearest point'x the projected position's x becomes the nearist point's x. same with their z points, but if I'm moving in a different direction from 0 degrees XZ how would I rotate the equation/condition? Here is what I got so far, and it's not working, as I go through walls, and such. Vector3f move = new Vector3f(0,0,0); move.x = (float)-Math.cos(Math.toRadians(yaw)); move.z = (float)-Math.sin(Math.toRadians(yaw)); // System.out.println("slopeNormal.z: " + slopeNormal.z + "move.z: " + move.z); move.normalise(); move.scale(movementSpeed * delta); float horizontaldotproduct = move.x * slopeNormal.x + move.z * slopeNormal.z; move.y = -horizontaldotproduct * slopeNormal.y; Vector3f dest = colCheck(pos, move, model, drawDist, movementSpeed, delta); Vector3f projPos = new Vector3f(pos); Vector3f.add(projPos, move, projPos); if(projPos.x > 0 && dest.x > 0 && projPos.x < dest.x) projPos.x = dest.x; else if(projPos.x < 0 && dest.x < 0 && projPos.x > dest.x) projPos.x = dest.x; if(projPos.z > 0 && dest.z > 0 && projPos.z < dest.z) projPos.z = dest.z; else if(projPos.z < 0 && dest.z < 0 && projPos.z > dest.z) projPos.z = dest.z; pos = new Vector3f(projPos);

    Read the article

  • 2D Ball Collisions with Corners

    - by Aaron
    I'm trying to write a 2D simulation of a ball that bounces off of fixed vertical and horizontal walls. Simulating collisions with the faces of the walls was pretty simple--just negate the X-velocity for a vertical wall or the Y-velocity for a horizontal wall. The problem is that the ball can also collide with the corners of the walls, where a horizontal wall meets with a vertical wall. I have already figured out how to detect when a collision with a corner is occurring. My question is how the ball should react to this collision--that is, how its X and Y velocities will change as a result. Here's a list of what I already know or know how to find: *The X and Y coordinates of the ball's center during the frame when a collision is detected *The X and Y components of the ball's velocity *The X and Y coordinates of the corner *The angle between the ball's center and the corner *The angle in which the ball is traveling just before the collision *The amount that the ball is overlapping the corner when the collision is detected I'm guessing that it's best to pretend that the corner is an infinitely small circle, so I can treat a collision between the ball and that circle as if the ball were colliding with a wall that runs tangent to the circles at the point of collision. It seems to me that all I need to do is rotate the coordinate system to line up with this imaginary wall, reverse the X component of the ball's velocity under this system, and rotate the coordinates back to the original system. The problem is that I have no idea how to program this. By the way, this is an ideal simulation. I'm not taking anything like friction or the ball's rotation into account. I'm using Objective-C, but I'd really just like a general algorithm or some advice. Many thanks if anyone can help!

    Read the article

  • X-Window Modeline for high resolution modes on NEC LCD 22WV monitor

    - by Jakub Narebski
    What should look like X Window System (X.Org) modeline to be put in xorg.conf, for high resolution (incuding recommended 1680x1050 @ 50Hz resolution) for 22" NEC LCD 22WV monitor? X.Org autodetect correctly only 800x600 and lower resolution SVGA modes, unfortunately. How can I generate proper "Modeline" line for xorg.conf? Is information included in NEC_Datasheet_LCD22WV-english.pdf enough (found on NEC LCD 22WV product info page)? What tools there are available to generate proper modeline for a LCD monitor for Linux? MS Windows (MS Windows XP Home) correctly detects and use 1680x1050 resolution; can I somehow get modeline information from MS Windows?

    Read the article

  • Can I get simple name resolution on the local network without DNS, on a Mac?

    - by tim
    I've got Mantis running on a Linux VM with a Win2k8 server host. I installed Samba with the following configuration: [global] workgroup = COMPANY netbios name = MANTIS security = share Now on all our windows machines people can simple go to http://mantis, rather than http://172.16.0.20. However, this doesn't appear to work on the Mac machines. Any ideas how I can sort this without changing anything on the Windows server?

    Read the article

  • How do I stop panning on a monitor that supports a specific resolution?

    - by IronicMuffin
    Hi all, I've been battling this for a few days now. Any and all help is appreciated. I have a planar monitor with a native res of 1280x1024. At one point, I had used PowerStrip to override "something" and set the res to 1600x1200, and it worked great. I then installed new intel graphics drivers for my 86895g (or w/e model) video card, which screwed up whatever settings I had. If I set it to 1600x1200 this time, it would set the res correctly, but give me a 1280x1024 viewport and the screen would pan when the mouse got to the edges of the screen. Absolutely not useful. Ok, so I was limited to 1280x1024 now. W/e. Now...enter new video card with two video ports. I have two monitors now and the latest nVidia drivers. I decide to try to get dual 1600x1200 going...ended up screwing the original monitor up so much now that it's at 1280x1024, with a 1024x768 viewport and panning! Absolutely not usable now. So what I need, and I can't seem to find on any forums, is help doing one or more of the following: Clearing out all monitor/edid info out of the windows registry without corrupting the registry. Actually correctly override the EDID values and get my sweet res back. Some other way of getting back to at least dual 1280x1024 with NO panning. Note: My device manager shows 4 monitors for some reason. My registry shows entries for all sorts of monitors that have been hooked up to the machine over the years. It's making it difficult to debug. Experience with PowerStrip would be helpful. I've been mucking with Phoenix EDID designer and MonInfo as well, but I'm stumbling around in the dark with these. Windows XP SP2 nVidia GeForce 6200 nVidia drivers: v258.96 Monitor: Planar PL 1910M Thanks!

    Read the article

  • Need to hookup HP dv7-3085dx with Nvidia GeForce GT 230M to my Dell 30 inch LCD 3007WFP at max resol

    - by user14660
    I recently bought an HP laptop (dv7-3085dx) (http://reviews.cnet.com/laptops/hp-pavilion-dv7-3085dx/4505-3121_7-33776108.html) which is supposed to have a pretty good video card (NVIDIA GeForce GT 230M). The card is supposed to output a max resolution of 2560x1600 which is also the max resolution of my monitor (http://www.ubergizmo.com/15/archives/2006/02/dell_3007wfp_on_dell_2001fp_action_8_megapixel_desktop.html). Now I bought an HDMI to dual link dvi (http://www.amazon.com/gp/product/B002KKLYDK/ref=oss_product) cable...this is after Best Buy's 70 dollar hdmi to dvi (perhaps it was 'single' link?) didn't give me the best resolution. In windows 7, when I try to set the max resolution for my 30 in monitor, I only get 1280x800...which is absurd. The monitor is great, I love the laptop and the video card supposedly supports such resolutions. So I can't figure out why I'm not getting better resolution (by the way, when i "detect" my monitor in windows 7, it is shown correctly as DELL 3007WFP!).

    Read the article

  • Screen resolution of monitor is wrong every time I turn the computer on?

    - by utahco
    Hi, Im just wondering if there is a solution to my weird problem. Every time I turn on my PC the viewport isn't aligned correctly on the screen - there is always a black strip on the right hand side. This is not a big issue as it can be resolved by pressing the menu button on the screen and doing a factory reset. However it is irritating having to do it every time. The weird thing it never used to happen before with the tower Im using. Is potentially out of date drivers a problem? Thanks.

    Read the article

  • Monitor resolution messed up somehow

    - by Kelp
    I purchased the Westinghouse 22" LCD LCM-22w3 a few years ago, and now it's been acting up on me. I just booted into Windows 7(without changing any settings), and the default resolution is 1600x1024, and it allows me to select a refresh rate of up to 85 Hz(it didn't let me do that). I usually have my resolution set to 1680x1050 with a refresh rate of 60 Hz. Now, that resolution does not even appear in the list. Does anyone have any idea of what could be the problem and how to fix it? Edit: I am not sure if this will help, but when I go to change the screen resolution, the monitor is known as "Generic Non-PnP Monitor". It used to be referred to as "Generic PnP Monitor). I tried to disable Generic Non-PnP Monitor, but when I restart, it uses that monitor again. Edit 2: I created a custom .inf file using Powerstrip, but that does not work either. The monitor settings are being stubborn.

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >