A technique for using rays to determine points of intersection. Often used in lighting simulation.

learn more… | top users | synonyms (1)

0
votes
1answer
54 views

How do I raycast to detect which hexagonal tile was clicked?

I want to detect the hexagonal tile a unit is on upon clicking on the unit. I was thinking of using a ray cast I can't get it to work. I'm trying to get the raycast to shoot from the bottom of the ...
0
votes
0answers
49 views

Organization of world/eye/clip bounding volumes for ray picking

I currently have objects defined in world coordinates and also other "overlay" type objects defined in eye or clip space. I want to be able to select objects (ray picking) from both the overlay or ...
1
vote
1answer
74 views

(Three.js) - What object3D properties are required to make rayCaster.intersectObjects() work?

FYI, i am trying to do something almost identical to the following: Merging geometry/mesh without losing benefits I essentially have a list of Three.object3D's. These objects are "merged" together ...
0
votes
0answers
22 views

360-degree rotation/movement inside a tube [duplicate]

I'm trying to implement in UE4 the same gameplay mechanic Ballistics had: https://www.youtube.com/watch?v=UaJiPpLzbNg Working with splines doesn't quite cut it, because they have to be done ...
0
votes
0answers
39 views

(Unity 3D) Why are bone colliders with an Animator Controller so finicky?

I have an NPC with colliders parented to its bones using the Unity ragdoll wizard. It also has an Animator Controller. The problem is, sometimes those colliders just don't work right. They're targets ...
0
votes
2answers
61 views

Libgdx, find Vector3 direction

I am using Libgdx along with Bullet physics. I have a vehicle moving. I would like to use a ray from the vehicles origin and in the vehicles forward direction. How can I create the forward Vector3 ...
0
votes
2answers
39 views

Converting A 3D Rotational Vector Into A 3D Forward Heading Vector

I need to do a raycast which accepts a Vector3D StartPos and a Vector3D EndPos. I have available to me the characters position and the cameras rotation in 3D vectors. I need to somehow compute a ...
-2
votes
2answers
123 views

AI shooting through walls [closed]

I made a AI shooting script for my new game but the problem is that the AI ignores the walls and shoots through walls. This is my ai script : #pragma strict public var rocketPrefab : Transform; ...
0
votes
1answer
88 views

Unity3d : Make prefab follow raycast hit

I've been trying to make a weapon script which fires a projectile (prefab) straight forward.I added to the bullet the first script shown here.And the second one to the main camera.The problem is that ...
2
votes
1answer
455 views

Orthographic Camera and Raycasting in Three.js

I'm working on a test project porting a simple game from iOS to Javascript. I've got the orthographic camera working and it can view the objects in the scene and move up and down the tower of meshes ...
0
votes
0answers
38 views

Mouse RayCast quadTree in XNa

Hallo i have quadTree terain and every quadNode have BBox.I have made function to return center of hitted quadNode BBox. But it's returns my bad calculations..... I have pitchedYawRoll camera ,it's ...
0
votes
1answer
213 views

Problem with Raycasting in a 2D Game

I'm new to using unity and came across a problem when I was following a tutorial. The game is in two dimensional space, and when my player walks over a certain tile the detection never goes off. ...
0
votes
0answers
76 views

Most efficient AABB - Ray intersection algorithm for input/output distance calculation

Thanks to the following thread : most efficient AABB vs Ray collision algorithms I have seen very fast algorithm for ray/AABB intersection point computation. Unfortunately, most of the recent ...
3
votes
1answer
161 views

Calculate the Intersection of Two Volumes

If you've ever played The Swapper, you'll have a good idea of what I'm asking about. I need to check for, and isolate, areas of a rectangle that may intersect with either a circle or another ...
0
votes
0answers
48 views

How to raycast select a scaled OBB?

I have the OBB picking code to select an OBB with code inspired from Real time Rendering 3 and opengl-tutorial.org. I can successfully select objects that have been moved or rotated. However, I cant ...
2
votes
1answer
149 views

Detect obstacles in path on a tile-based map

I'm creating a 2d game with a tile-based map, but smooth movement. I currently use A* in combination with some other tricks for pathfinding, and one issue what I've been dealing with is getting the ...
0
votes
1answer
465 views

How to find objects in front of my player

I am trying to find an object that is in front of my player sprite using the following code RaycastHit2D hit = Physics2D.Raycast(transform.position,Vector2.right,EnemyLayer); //EnemyLayer is the ...
1
vote
1answer
155 views

The correct way to transform a ray with a matrix?

Playing with XNA Triangle Picking Sample I found out that it does not work well if you scale the world matrix of the objects you want to pick. When I dug into the implementation I found this comment ...
0
votes
0answers
62 views

Libgdx get 3d intersection coordenate

Is there any algorithm that takes an arbitrary point coordinates as input and determines which is the 3d coordinate where the ray intersects the mesh? Use case: The mesh is rendered on the screen, ...
2
votes
1answer
173 views

How do I find voxels along a ray?

I am making a voxel engine, and I want to make it possible to create and destroy voxels with the mouse. I use C++ and OpenGL, so C++ examples would be best. So far, I have the camera position and ...
0
votes
1answer
118 views

Bounding Box in Monogame for mouse picking - Ray perspective

My mouse ray is screwing up precision. I don't really know how to fix it, maybe you guys can help. problem : (5.6mg gif) https://www.dropbox.com/s/v0z67afso88hsd1/perspective_ray.gif how i create ...
0
votes
1answer
166 views

Is this the correct way to detect ray-sphere intersection?

I have this java function that should return a true or false for any sphere passed to it if they intersect. However it seems to end being true a lot of the time when it shouldn't and false sometimes ...
0
votes
1answer
339 views

How does Raycasting work in XNA Farseer and player collision?

Wanting to know how to figure out if player's bottom is colliding with object so that I could allow the player to jump. I was trying to use OnCollision but was referred to ray-casting, I looked ...
0
votes
1answer
1k views

Platformer raycast collision detection

I'm using Unity to create a 2D platformer. For collision detection, I'm using raycasting to detect any possible collisions with specific collision layers, and adjusting the desired delta x & y ...
0
votes
2answers
183 views

Thick Ray interaction with AABB

I would like to intersect a thick ray (actually a cylinder) with an AABB. The current code to perform intersection with the ray is the following. template <class RealT> bool ...
4
votes
1answer
220 views

How can I ensure field of view symmetry in a Roguelike?

I'm working on a Roguelike, and for it I've created a ray-tracing/casting field-of-view (FoV) algorithm that consists of plotting Bresenham lines to every point in a solid circle. It's artifact free ...
2
votes
3answers
269 views

Strategy for detecting hits from a “cylinder ray”?

I was planning on using ray casting for collision detection in my game. However, when I use an attack similar to this: (which would project something like a cylinder), how would I go about ...
2
votes
1answer
266 views

Ray picking and bounding boxes in Java

How do I check which bounding boxes (of different types) a ray, sent from the camera through the mouse-click coordinates, intersects with first in Java (and where)? I have arrays (box_X, box_Y, box_Z, ...
0
votes
0answers
154 views

Block picking / ray casting through 3d blocks always slightly off

I've been working on adding a line-of-sight/ray-tracing system to my 3d block-world game. I've tried several different methods and they all work fairly well. At the moment I'm using something similar ...
2
votes
1answer
179 views

Are ambient, diffuse and specular light or material properties?

Are ambient, diffuse and specular properties of light or material? I am doing ray casting in OpenGL, I've managed to create lit sphere using formula I = L Ka + L Kd (n . l) + L Ks (r . v)^n but I ...
3
votes
1answer
613 views

box2d raycast filter category

I am trying to filter a category in my ray casting (jBox2D within libGDX), which should return the closest object that does not belong to the category LEVEL0. I've tried a plethora of approaches, but ...
1
vote
0answers
237 views

How to identify whether the boundingvolume intersects with walls or floor when it doesnt return normals?

My game in jMonkey is the kind that use will have to place objects in a scene (which consist of walls and slabs and floor). All my models are centered at origin. When the user click a point I use ray ...
0
votes
1answer
138 views

How to place an object so that it does not overlap the objects in my scene?

In my game, the user has to click at a point to place an object (mesh). I can cast a ray and find the horizontal point where the object can be translated and then attached to rootNode to display it. ...
0
votes
0answers
222 views

LWJGL Mouse picking when camera rotated

I have third person camera in my game and I have mouse picking which works not so good. It works good only when yaw rotation is lesser than ~75 if yaw is greater than 75 then it fails.. Here is video ...
2
votes
0answers
85 views

Corona SDK Live RayCasting [closed]

I'm looking for help involving rayCast in Corona SDK. If you haven't see it here's a link talking about it along with a demo. WEll in the demo you tap on a space and the ray is recasted and bounced if ...
0
votes
1answer
181 views

Volume raycaster problems HLSL

Hi this is my first question here so if I fail to include some necessary piece of information please dont rip my head off. ^^ I can't seem to get my volume raycaster to workt properly. I've been ...
4
votes
3answers
469 views

How to check whether a ray cast hits a specific side of an object?

I am using Ogre3d to develop a 3d simulation/game. One task is to determine whether the user has focused the camera on a specific object. So I cast a ray from the camera to what is currently in the ...
0
votes
1answer
106 views

3D drawing precision problem. XNA

I have a simple scrolling camera positioned 2000 units about the 3D 'floor' that moves forward by 1 unit every frame and looks down on the floor at a point that also moves forward by 1 unit every ...
0
votes
1answer
392 views

How can I remove the view and projection matrix from ray position to get only the ray model?

I've got a little problem with my picking module and I need your help. I have a method to project a ray from the camera to a fixed point when I click somewhere. The computed ray looks good, it go to ...
-1
votes
1answer
121 views

Ray picking gives inversed results

I'm trying to do a simple ray picking implementation to allow a user to select a cell in a grid rendered in 3D. I'm almost there, but I've ran into an issue which I can't seem to solve. Consider the ...
7
votes
3answers
3k views

How do I implement occluded lighting in a block-based 2D game?

I want to have 2D lighting that can be blocked by in-game objects. My game has a top-down view and all game objects are described by rectangles. Let's say I have a 10x10 world and I place a light at ...
8
votes
2answers
403 views

Diagonal line of sight with two corners

Right now I'm using Bresenham's line algorithm for line of sight. The problem is I've found an edge case where players can look through walls. Occurs when the player looks between two corners of a ...
1
vote
1answer
197 views

Quick 3D sight calculation algorithm

I have a tile based board game where units move in 3D space on a 2D isometric view. When calculating attack tiles for a unit, how do I verify that they aren't shooting through a wall or a level too ...
1
vote
1answer
362 views

Ray Tracing in 3D - generating a ray

A ray is shot from the camera eye to the camera screen at point (i,j) how do I get the coordinates of that point in 3D world coordinates? The best I could find online is for point S S = Q + au + bv ...
0
votes
3answers
168 views

Keeping raycast on the same level

I want my raycast to end at certain height(red line). But as the game is 3D and the camera rotates I can't use a fixed magnitude. What I thought was a stroke of genius, I figured I'd project the ...
0
votes
1answer
351 views

Displaying sprites in a 2.5D raycasting engine

I'm developing a raycasting engine like the one used in DOOM, Wolfenstein 3D, etc. My engine is capable of correctly displaying walls and textures on walls, but I'm stuck at sprites rendering. Given ...
5
votes
1answer
2k views

More efficient way to implement Line of sight on a 2d grid with ray casting?

Consider a 2d grid of tiles, and an approximated sphere of coordinates - centered on the player - that represents line of sight. The goal is to block the line of sight beyond obstacles (ie walls). ...
11
votes
4answers
3k views

Cast ray to select block in voxel game

I am developing a game with a Minecraft-like terrain made out of blocks. Since basic rendering and chunk loading is done now, I want to implement block selecting. Therefore I need to find out what ...
2
votes
1answer
931 views

Raycasting “fisheye effect” question

Continuing my exploration of raycasting, I am very confused about how the correction of the fisheye effect works. Looking at the screenshot below from the tutorial at permadi.com, the way I ...
1
vote
0answers
85 views

Performance issues with visibility detection and object transparency

I'm working on a 3d game that has a view similar to classic isometric games (diablo, etc.). One of the things I'm trying to implement is the effect of turning walls transparent when the player walks ...