Description
Add Vector Math To GM Studio!
Vector variable type and supporting functions like add, mult, cross product, dot, and much more!
GMS:2 Compatible
Now you can convert vector math found all over the web to GML!
For this example c++ example found on the web:
VEC3 Reflect(const VEC3 &incident, const VEC3 &normal)
{
return incident - 2.f * Dot(incident, normal) * normal;
}
Becomes this in gml
///tmc_vect_reflect(incident, normal)
//incident and normal are tmc_vect2 or tmc_vect3 types, works in 2d or 3d
return tmc_vect_sub(argument0, tmc_vect_multr( argument1, 2.0 * tmc_vect_dot(argument0, argument1)));
Features:
- Vector2d
- Vector3d
- Vector4d
- Smart Data Type using arrays
- Multiple Dimensional Vectors
- Smart Functions apply proper math to different vector types
- Smart Functions select proper math when vectors of different types are passed
- Add
- Subtract
- Divide
- Multiply
- Normalise
- Cross Product
- Dot Product
- Scale
- *Get Scalar
- Get Length
- Get Direction
- Math with Vector on Vector
- Math with Vector on real
- *Line Segments
- *Shape
- *Line Segment Container
- *Shape Container
- *75 Functions over 6 Data Types, and 2 container types
Vector Class Changes:
- Fixed a few errors in a few function
- Added more features to the vector class
- Fixed the size of the class to be identical in size no matter if 2d or 3d vector because (4)...
- Added the ability to store extra data to vector and all new casses
Extra Bit
- Added segment, shape and Pill class (*WIP)
- Added Platformer test and a Pill Class (*WIP)
Features will be added as requested
More info
End User Licence Agreement (EULA).
Age Rating: None
Version
GMS1 - Version 3.0.1. Published June 15, 2015
Version 3 changes a few things:
- uses tmc_vecN as opposed to tmc_vectN,
- uses dedicated vec2, vec3, vec4 functions to streamline the math
- In this way the min(vectsizeV1,veectizeV2) and the for loop is removed
- whenever possible, I abstained creating interim variables
- Adds many variant to set data to a preexisting vector to limit the creation of temporary vectors
- Version 2 remains in the package untouched aside some additions and bug fixes
3.0.1 - fixes the asset update screw up dropping the demo
Privacy Policy
Package contents
Loading, please wait
What is the issue?
Loading, please wait