Faulty normals in WorldCraft/Hammer?
by Will Sanders · in Torque Game Engine · 03/01/2003 (6:08 pm) · 1 replies
I've exported two simple "maps" from Hammer. They both have flat surfaces, so all normals on the floor should be (0,0,1). However, sometimes when doing a castray(), I'll come up with a normal that's WAY off. I've noticed on flattened terrain, this never happens.
So could there something wrong with:
a) my map (even the one that's just a floor?!),
b) the Hammer exporter,
c) castray() on InteriorInstance, or
d) something completely different?
p.s. - One thing I noticed is that the faulty normal tends to be the opposite direction of the vector going into castray().
So could there something wrong with:
a) my map (even the one that's just a floor?!),
b) the Hammer exporter,
c) castray() on InteriorInstance, or
d) something completely different?
p.s. - One thing I noticed is that the faulty normal tends to be the opposite direction of the vector going into castray().
Torque Owner Will Sanders
Default Studio Name
(note: all surfaces tested are flat, horizontal. All normals should be (0,0,1))
---Flattened terrain is just fine---
output:
>You just hit a TerrainBlock
>That was normal (0.000000, 0.000000, 1.000000).
>You just hit a TerrainBlock
>That was normal (0.000000, 0.000000, 1.000000).
---Quark or Worldcraft interiors are sometimes screwy---
output:
>You just hit a InteriorInstance
>That was normal (0.000000, 0.000000, 1.000000).
>You just hit a InteriorInstance
>That was normal (0.000000, 0.000000, 1.000000).
>You just hit a InteriorInstance
>That was normal (0.871002, -0.069903, 0.486282).
WOAH! What the heck?! This makes me wonder how a game like Marble Blast was made if the normals from the InteriorInstances sometimes gave an angle almost 60 degrees off. Can ANYONE shed ANY light on this? Much thanks in advance.