Equation of a plane and normals + Decals
In my uDev entry I have decided to make roads a separate object on top of the height-map terrain. Right now I have a road that is in the correct X and Z position but the Y position is a constant 15. What I want to do while loading is take each vertex and keep their X and Z location but using the planes normal, find the Y location so the point is on the plane. How would I do this?
Also, once I get that fixed, should I add something like .02 to the roads height to make sure it is drawn instead of the terrain, or is their a better way to do that so the road is always drawn slightly above the terrain (I don't want them to merge together far away, which is what I am afraid might happen).
Also, once I get that fixed, should I add something like .02 to the roads height to make sure it is drawn instead of the terrain, or is their a better way to do that so the road is always drawn slightly above the terrain (I don't want them to merge together far away, which is what I am afraid might happen).
Sounds like the same question I asked in the createmacgames forum: http://www.createmacgames.org/forum/viewtopic.php?t=161
Thanks! From belthaczar's post I have came up with this code
EDIT : Code removed because it was wrong, I will fix it now
EDIT : Code removed because it was wrong, I will fix it now
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Rendering a reflection about an arbitrary plane | TomorrowPlusX | 3 | 3,836 |
Jan 14, 2008 07:51 AM Last Post: TomorrowPlusX |
|
| Decals on terrain, objects etc. | IBethune | 3 | 2,596 |
May 11, 2007 07:44 AM Last Post: TomorrowPlusX |
|
| pls help ....am in desperate need of code (illuminating equation) | shru_ani | 2 | 1,893 |
Oct 30, 2006 04:32 PM Last Post: Najdorf |
|
| Math: mirroring a view frustum about a plane | TomorrowPlusX | 1 | 2,632 |
Aug 19, 2006 03:30 PM Last Post: Jones |
|
| Drawing an Infinite Plane | unknown | 3 | 2,532 |
May 5, 2006 12:54 PM Last Post: Zekaric |
|

