Add Vector Math To GM Studio!
Vector variable type and supporting functions like add, mult, cross product, dot, and much more!
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
//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)));
- 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
- Cross Product
- Dot Product
- *Get Scalar
- Get Length
- Get Direction
- Math with Vector on Vector
- Math with Vector on real
- *Line Segments
- *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
- Added segment, shape and Pill class (*WIP)
- Added Platformer test and a Pill Class (*WIP)
Features will be added as requested
End User Licence Agreement (EULA).
Age Rating: 4+
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
Loading, please wait
What is the issue?
Loading, please wait