CastRay and interiors...
by Manoel Neto · in Torque Game Engine · 01/30/2006 (3:13 pm) · 3 replies
I need to change the way castRay works on interiors. Right now, it always casts the ray against the interiors true geometry, and ignores collision-only hulls, when all other collision-related functions do just the opposite.
I need a way to cast a ray against the collision hulls. I need this data to align a special player class to the geometry underath it. Can anyone help me.
I need a way to cast a ray against the collision hulls. I need this data to align a special player class to the geometry underath it. Can anyone help me.
About the author
Recent Threads
#2
These horses can align themselves to the terrain or interior surface below them using a blended animation thread. It casts two rays, one for the horse's front and another for it's back hoofs. The height difference between the front and back is used to set the thread position.
We have a track with staircases. To make things less jumpy, we placed a simple collision hull over the stair steps, creating a slope. But since the raycast ignores the collision hull and goes after the visible brushes, the horse tries to align with the stairsteps, instead of using the slope.
I'm going to try to tweak the values I'm using the sample the points and interpoalte between the conform sequence positions to see if I can get a better result.
01/31/2006 (2:54 am)
I'm working on an arcade-ish horse-racing game. It's more like a Mario Kart with horses instead of karts. The horses are a modified player class (creating them out from vehicles was too troublesome). These horses can align themselves to the terrain or interior surface below them using a blended animation thread. It casts two rays, one for the horse's front and another for it's back hoofs. The height difference between the front and back is used to set the thread position.
We have a track with staircases. To make things less jumpy, we placed a simple collision hull over the stair steps, creating a slope. But since the raycast ignores the collision hull and goes after the visible brushes, the horse tries to align with the stairsteps, instead of using the slope.
I'm going to try to tweak the values I'm using the sample the points and interpoalte between the conform sequence positions to see if I can get a better result.
#3
Interpolating between te sequence positions at a fixed speed, instead of plain setting the new value solved the problem. Now the horse smoothly goes up and down the staircases, with a very subtle shaking. The raycasts agains tthe true interiors geometry now works on my favor.
01/31/2006 (3:18 am)
Heh, that did the trick^^Interpolating between te sequence positions at a fixed speed, instead of plain setting the new value solved the problem. Now the horse smoothly goes up and down the staircases, with a very subtle shaking. The raycasts agains tthe true interiors geometry now works on my favor.
Associate Matt Fairfax
PopCap