AssetTypeProjectilePath.xsd 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="uri:ea.com:eala:asset" xmlns:at="uri:ea.com:eala:asset:type" xmlns:balance="uri:ea.com:eala:balance" xmlns:xas="uri:ea.com:eala:asset:schema" targetNamespace="uri:ea.com:eala:asset" elementFormDefault="qualified" xmlns:XmlEdit="http://tempuri.org/XmlEdit.xsd">
  3. <xs:complexType name="ProjectilePathNode">
  4. <xs:sequence>
  5. <!-- - Coordinate System:
  6. The x-axis is considered the line from the projectile to the target at launch
  7. (the "look-at" direction).
  8. The y-axis is the left-right horizontal movement.
  9. The z-axis is the vertical movement.
  10. w is currently unused.
  11. - The final coordinate in this list is considered the terminal node; ie, where
  12. the projectile hits the target
  13. - InVec dictates the direction tangent as Point is approached
  14. - OutVec dictates the direction tangent as Point is being departed
  15. - For a projectile to be "smooth" during these transitions, Invec, Point,
  16. and OutVec should be collinear. Conversely, if you want them jaggy, then
  17. they should not be collinear. This *DOES* still apply to the last Node,
  18. since the projectile will have to construct a segment from the last Node
  19. to the final target location in several cases. If you want the last Node
  20. to be where it hits the target, then you want to set Y and Z to 0 on its Point.
  21. Notes:
  22. - How these look is limited by the framerate of the game.
  23. Fast-moving projectiles should have a small number of nodes, otherwise segments will
  24. be clipped. The rule of thumb here is that a segment should be long enough
  25. to last at least 3 logic frames, at speed, in the worst case.
  26. - In general, gameplay correctness (eg the time it takes to get to target)
  27. is respected over the aesthetics of the Bezier curve in these boundary cases.
  28. - Successive segments should not be dramatically different in length,
  29. as it can cause hitches in the projectile velocity during segment transitions.
  30. - No Node should have any of its vectors be of smaller magnitude than
  31. 1/1000'th of the magnitude of the final Node's Point vector, otherwise
  32. Very Bad Things will happen.
  33. -->
  34. <xs:element name="InVec" type="Vector4" minOccurs="1" maxOccurs="1" />
  35. <xs:element name="Point" type="Vector4" minOccurs="1" maxOccurs="1" />
  36. <xs:element name="OutVec" type="Vector4" minOccurs="1" maxOccurs="1" />
  37. </xs:sequence>
  38. </xs:complexType>
  39. <xs:complexType name="ProjectilePath" xas:runtimeWrapper="::ProjectilePath" xas:typeGroup="Xml">
  40. <xs:complexContent>
  41. <xs:extension base="BaseInheritableAsset">
  42. <xs:sequence>
  43. <!-- ComponentScale will linearly stretch the points along those ordinals relative to the other points,
  44. so you don't have to manually edit each point just to stretch it in a direction
  45. -->
  46. <xs:element name="ComponentScale" type="Vector4" minOccurs="0" maxOccurs="1" />
  47. <xs:element name="Node" type="ProjectilePathNode" minOccurs="2" maxOccurs="unbounded" />
  48. </xs:sequence>
  49. </xs:extension>
  50. </xs:complexContent>
  51. </xs:complexType>
  52. </xs:schema>