Author Topic: Help with Normals  (Read 939 times)

Offline 123savethewhales

  • *
  • Posts: 2923
  • Rep: 30
  • Friendship is Magic
  • Awards BOTM Winner
    • View Profile
    • Awards
Help with Normals
« on: June 23, 2011, 07:46:18 PM »
So if I have something like this

normal = true 1 1 0  1 1 0

"True" means damage is deal regardless of direction, "1 1 0  1 1 0" means the weapon deals damage on +- X, and +-Y, but not +-Z

This is intended for a disk weapon and I just want to make sure I got things right.

Offline JoeBlo

Re: Help with Normals
« Reply #1 on: June 23, 2011, 08:31:58 PM »
"True" (or you can use 1) means both directions + and - on the axis

--------------

normal = true 1 1 0 

Is read as..

normal =  +-X +-Y

--------------

You dont need the second set unless you want 2 different damaging sides


 

Offline 123savethewhales

  • *
  • Posts: 2923
  • Rep: 30
  • Friendship is Magic
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Help with Normals
« Reply #2 on: June 23, 2011, 08:35:43 PM »
Humm, so can you explain to me why DSL Saw uses

normal = true 1 0 0  0 1 0?

instead of just

normal = true 1 1 0?

Offline JoeBlo

Re: Help with Normals
« Reply #3 on: June 23, 2011, 08:56:34 PM »
hmm.. by my limited understanding

I interpret it as (so I could be wrong)



Red - X Axis
Green - Y Axis
Blue - Damage area..

The first is 1 1 0 where it does damage between the to co-ordinates

the second is 1 0 0   0 1 0 where is does damage in those directions which forms a box around

Pretty much the same result (excuse the badly drawn box on the first)

Offline 123savethewhales

  • *
  • Posts: 2923
  • Rep: 30
  • Friendship is Magic
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Help with Normals
« Reply #4 on: June 23, 2011, 09:04:03 PM »
Thanks.  Guess I just stick to the Saw version and see how that goes.

Offline Clickbeetle

  • *
  • Posts: 3375
  • Rep: 21
  • In Soviet Russia, bugs stomp YOU!
  • Awards BOTM Winner
    • View Profile
    • Beetle Bros site
    • Awards
Re: Help with Normals
« Reply #5 on: July 04, 2011, 01:38:51 AM »
hmm.. by my limited understanding

I interpret it as (so I could be wrong)

(Image removed from quote.)

Red - X Axis
Green - Y Axis
Blue - Damage area..

The first is 1 1 0 where it does damage between the to co-ordinates

the second is 1 0 0   0 1 0 where is does damage in those directions which forms a box around

Pretty much the same result (excuse the badly drawn box on the first)


No, the sets of three numbers are coordinates in space, not lists of axes.  Think of them like the TM_ROWs in attachment points.


1 1 0 defines a point halfway between the X axis and the Y axis.  So a component with normal = true 1 1 0 will do damage both ways in one direction, that direction being a line 45 degrees up from the X axis.


I'm not even sure if 1 1 0 is a valid normal.  Those coordinates are always set at a distance of 1 from the origin, whether in TM_ROWs or in component normals, so if you want to do damage in a line between X and Y it should be 0.7071 0.7071 0.  However I haven't tried it using a distance greater than 1 so it might still work.


1 0 0  0 1 0, by contrast, tells the component to do damage in TWO directions, along the X axis and along the Y axis.  There's quite a large margin of error in the "damage zone", enough so that when you do damage in positive and negative X and Y, it effectively does damage in a plane.  Which is what you want for a disc.


There aren't any stock components that have normals using more than two directions, but you can actually use as many as you want. So you could do normal = false 1 0 0  0 1 0  0 0 1  and it would only do damage in positive X, Y, and Z.  This is a lot different from normal = false 1 1 1 which would only do damage in one direction between the three axes.

To lack feeling is to be dead, but to act on every feeling is to be a child.
-Brandon Sanderson, The Way of Kings