gametechmods

Robot Arena => General Support => Topic started by: 123savethewhales on June 23, 2011, 07:46:18 PM

Title: Help with Normals
Post by: 123savethewhales 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.
Title: Re: Help with Normals
Post by: JoeBlo 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


 
Title: Re: Help with Normals
Post by: 123savethewhales 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?
Title: Re: Help with Normals
Post by: JoeBlo on June 23, 2011, 08:56:34 PM
hmm.. by my limited understanding

I interpret it as (so I could be wrong)

(https://gametechmods.com/uploads/images/1272diagrams.PNG)

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)
Title: Re: Help with Normals
Post by: 123savethewhales on June 23, 2011, 09:04:03 PM
Thanks.  Guess I just stick to the Saw version and see how that goes.
Title: Re: Help with Normals
Post by: Clickbeetle on July 04, 2011, 01:38:51 AM
hmm.. by my limited understanding

I interpret it as (so I could be wrong)

(https://gametechmods.com/uploads/images/1272diagrams.PNG)

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.