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

learn more… | top users | synonyms (1)

0
votes
1answer
29 views

Given a ray-intersect position on morphed mesh, how to compute that position at each morph target?

I'm working on an annotation system that allows a user to click on a mesh to attach a pin with a label hanging off it. It must be possible to pin an annotation on an object that's being morphed with ...
0
votes
1answer
37 views

Raycast Masks not working Unity3D

I'm having a problem with filters/masks when raycasting. I've created a LayerMask and then in the inspector selected the layer I want to ignore when Raycasting. however then I print out the name of ...
2
votes
1answer
80 views

Simple Doom style engine question

I've just started making a 'raycast' engine, a pseudo 3D FPS engine similar to Wolfenstein/Doom. I haven't done much reading so my implementation is likely very naive. My current working prototype ...
0
votes
0answers
49 views

Trouble with Raycast Selection using OpenGL

I am currently having trouble with a custom model editor in which I want to implement model selection (eventually featuring face selection to have something like "click-and-drag" to extend the cubes). ...
0
votes
1answer
61 views

My Raycast will not detect collisions in my Unity 2D project. What am I doing wrong?

I appreciate any help you can offer me. I created a script for a character controller that casts two rays below the player's gameobject. The rays extend infinitely and should collide with another ...
0
votes
2answers
71 views

Fast Ray Sphere collision code

I am looking at here and while it's well organized a lot of links are broken: http://www.realtimerendering.com/intersections.html I am trying to find fast code that will give me the hit point and the ...
0
votes
2answers
52 views

RayCast method always outputting False

I am having trouble executing a raycast to check if there is anything between the player sprite and a second sprite. This is my code : void Start () { play1 = GameObject.Find("player"); ...
1
vote
0answers
37 views

parented/constrained object transform lags when moving character in unity3D

Hi I have a simple raycast-base gun that emits particles along it's path to fake bullets. Whenever I move the camera/character- the particles are misaligned, as well as anything else I try to modify ...
4
votes
1answer
328 views

Blocking Physics Raycasts with Unity's 4.6 UI?

I use raycasts to determine hit objects and object selection in our game. I want these to be blocked by UI elements. Before I had a crude form of that where I just excluded rects of the screen, though ...
0
votes
1answer
31 views

How to represent ray and line segment in parametric form?(Visibility)

I am trying to implement this algorithm but am not sure how I am supposed to represent my ray and my line segments(walls). For the r_px/r_py do I just use the position of the light? For the ...
0
votes
1answer
58 views

Get fragment from mouse position

I have a painting app for texture artists that I am working on. I am able to paint to a flat canvas that updates the texture of a 3d object in an object viewer. Now I want to be able to paint directly ...
0
votes
1answer
59 views

How to reference the right object in Unity

So, I'm developing this small 2D project where I have a sphere that detects if objects get close to it from three different directions. I have successfully found a way to detect if an object ...
1
vote
2answers
74 views

How can I create a precise touch in Unity

Is there a way so that I can touch an object precisely? I have these aerial cars and there pretty tiny like 32 by 32 and it's hard to touch them using a raycast. I thought I'd spawn an object with a ...
1
vote
1answer
656 views

Graphics Raycaster of Unity; How does it work?

I'm making a small game for the first time and enjoying it thus far. The only thing that keeps bothering me is that I can't find a human explanation of what the graphics raycaster does. What's the ...
1
vote
1answer
42 views

Finding the side of a shape a ray intersects

For some simple 3D shapes (cubes, prisms) how can I determine which side a ray intersects, knowing the direction of the ray, and the normals of the shapes' sides. I thought of using plane ...
1
vote
1answer
121 views

What is the correct way to raycast on click?

I am using raycast from screen point to detect if the user has clicked/touched on something. The following fails 1/10 times; at first I thought due to the raycast missing the subject below, but after ...
-1
votes
1answer
84 views

2D bouncing formula doesn't work properly

am new to unity, and i am trying to create a bouncing ball, so i've did many researches about bouncing realted physics and i found a formula : Formula: -2*(V dot N)*N + V Where V is the velocity ...
0
votes
2answers
136 views

Raycasting on Z in 2D

I'm making an isometric game in Unity. So far I have managed to render a diamond shaped board, with tiles that are aligned on the x and y axis (and the camera looks down the Z axis). I am spawning ...
0
votes
1answer
98 views

Problems with Raycasting Requirements

Im working on a script which kinda works like an Enemy AI. Its kinda like a detection system with requirements that are required to be met. This is a recent question i asked using my code Raycast ...
0
votes
0answers
47 views

Ray casting: need to find start and end vectors

So I have a 3D object and I'm trying to implement Maximum Intensity Projection on it. I already started of using a default vector to show per pixel, namely: pixelCoord[0] = uVec[0] * (i - ...
0
votes
1answer
84 views

Raycast Flashing problem

Can anyone tell me what is wrong with me code ? If you can see, whenever the player is in range of the raycast. The enemy turns red. But for some reason. Even when the player has meet the requirement ...
0
votes
0answers
48 views

Why Reducing fragments by increasing geometry vertices turn out to be slow?

I am developing a ray-casting program by OpenGL. At first I made a large bounding box including the whole volume and render this box, which triggers the ray-casting. I'm trying to optimize this ...
-3
votes
1answer
70 views

Direct raycasting from moving point A and moving Point B

I am attempting to raycast from Point A to Point A (both moving points). I dont understand the comcept of raycasting (direction). Update() { player = GameObject.FindGameObjectWithTag ("Player"); ...
0
votes
1answer
873 views

How can I raycast between two moving objects in Unity?

How can I raycast between two moving objects? I want to raycast from a moving enemy to a moving player. I dont know how to actually code to make the direction work. using UnityEngine; using ...
0
votes
0answers
28 views

Creating a ray with angle movement restrictions

In Unity is it possible to create a ray which has movement restrictions. As in creating a ray which is fixed to one point. When this point is moved around. The line is also moved around. But when the ...
1
vote
2answers
242 views

Unity Raycast shoots right through some objects

I made a melee combat system for my game. The code looks like this: var hit:RaycastHit; if(Physics.Raycast(transform.position,transform.forward,hit)) { if(hit.distance<=2.0) { ...
3
votes
1answer
143 views

How can I consistently identify location on a mesh from a raycast hit?

I am using RaycastHit.triangleIndex to identify a location on a mesh (very low poly). However, I have discovered that a given triangle on the mesh does not have the same triangleIndex value from one ...
3
votes
2answers
140 views

Intersection between moving circle and some squares

I'm developing a 2D game made of squares. What I need to do is check if a circle collides with any of the squares as it moves. I have a raycast function to check the same idea, but using a point. I ...
3
votes
3answers
193 views

Is there algorithm for boxcasting or thickray casting?

I am not sure what the correct name is called but here is my problem: I have implemented a casting ray function that works as expected. However, because I am using a loose grid structure, (ie, objects ...
0
votes
1answer
83 views

Ray casting problem using JOGL

I'm trying to port an old perfectly functioning ray casting implementation from my lwjgl project (FF pipeline) to a new project using JOGL and shaders. My problem is that my ray no longer intersects ...
0
votes
0answers
173 views

In libgdx, how do I get the intersection of a ray with a model instance?

I am using LibGDX trying to use raypicking to pick a point on a Mesh. I have two methods for this that don't seem to work quite right: /** * @param ray * @param intersection The vector to store ...
-1
votes
1answer
620 views

Unity 3D: Raycasting for gun hits

I am having trouble understanding raycast hits in Unity3D. I am trying to create an FPS game, so I have a gun, bullets and so on. My script for the bullets is: var Bullet : Transform; var Spawn ...
0
votes
1answer
290 views

Raycast doesn't point on the right direction

The raycast line im rendering is acting weird, it doesn't point where I want it to. I want it to point from the yellow object to the selected one but it draws it at another position. Here is my ...
0
votes
1answer
122 views

Raycast algorithm fails to collide with diagonal walls in specific locations

I'm having a problem with my ray-cast algorithm in a 2D tile-based universe. I feel the situation would be best explained with a picture, so here it is: The ray, represented by the blue line, is ...
0
votes
2answers
139 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
54 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 ...
2
votes
1answer
887 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
23 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
114 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 ...
-1
votes
2answers
109 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
99 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 ...
4
votes
1answer
84 views

How to raycast against a physx cloth mesh?

I'm using the PhysX 3.3 SDK in a application and mostly everything is working fine. However, I'm trying to develop a feature that would allow users to click on various actors in the scene and modify ...
-2
votes
2answers
187 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
445 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 ...
3
votes
1answer
1k 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
52 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
659 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
283 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
204 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
80 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 ...