matrix

  1. C

    SOLVED can't see matrix

    var matrix1 = matrix_build(x, y, zp - 80, -90, -90, obj_npl.look_dir, 1, 1, 1); matrix_set(matrix_world, matrix1); draw_sprite_ext(spr_plant, 0, x, y, 1, 1, 0, c_white, 1); matrix_set(matrix_world, matrix_build_identity()); I am making a first person game. the above code is...
  2. W

    GML What is the best way to perform binary math operations between 2 grids?

    I have two 14x14 ds_grids that I'm trying to use as a bitboard. How can I perform a logical_or operation between the two grids to produce a new grid of values like I can with matrices in NumPy? For example if I had two 3x3 grids like the following... [ [0,0,1], [0,0,1], [0,1,0], ]...
  3. Tangerine

    GML Help to apply texture to 3D model

    Hello! This is my first time importing a 3D model and I have problems at importing the texture.
  4. Nocturne

    GML Camera Matrix Issue

    Hello! It's not often I have to make a thread here that isn't an official announcement or something, but, well, I am stumped by this one! šŸ˜… The td;dr of the issue is as follows: A user has my Aura asset and is creating a custom camera using the matrix functions My Aura asset crashes trying to...
  5. Erik Leppen

    draw_tilemap doesn't draw the whole tilemap (using matrix) - how to draw more?

    I have a game where the world is some 200 x 200 cells, of which a part is "rock", i.e. not accessible for most game objects. Right now I use a vertex buffer to draw the rock tiles, but this just shows unicolor squares. To liven things up, I want to use a tileset for this. But the game world is...
  6. Bart

    Sequence transform hierarchy - Modifying a sequence track's matrix (sequence_instance.activeTracks[i].matrix)

    Hi all. I am currently doing some first tests with sequences, mainly to see if the system could be used together with some basic 3D animation. That would require a bit more than a basic (x, y) position and a rotation, which doesn't seem to be present at first sight but which might be possible...
  7. Bart

    SOLVED matrix_stack_top() not equal to the matrix last pushed?

    Hi all. I am currently using the matrix stack to put some transformations aside and restore them back later. This was going well initially until I stumbled on something that seems inexplicable to me. The relevant bit of code is the following (log is simply a macro defined as...
  8. Mehdi

    SOLVED Deactivate instances outside of a view? (Perspective Camera)

    Hello friends, I implemented Matharoo's 2.5d camera to add parallax effect to my game: Tutorial However as you may know using 3d projection matrices disables 2d view functionalities. (e.g. viewX,viewY, viewWidth, viwHeight) Now for the purpose of optimization I need to deactivate instances...
  9. Mehdi

    GML View coords with perspective camera?

    I implemented a 2.5D camera using matrices. However it seems using this type of camera makes properties of ordinary cameras like viewX, viewY,, ... unavailable. Anyone knows how can I retrieve theses attributes while using viewmat and projmat?
  10. F

    3D Finding Camera to World Matrix

    Heya! I've been struggling trying to create a function that converts 2d screen coordinates into a 3d raycast. I think I've found a good way to do it, but it involves transforming a directional vector from camera-space to world-space. I understand that in order to convert world-space...
  11. Binsk

    Asset - Scripts UBG Math [vectors, quats, and matrices]

    I don't know about you but I really get tired of re-implementing vector and matrix math for every 3D project started. This extension is my solution. I decided to make a professional library that integrates well as if included in the engine by default. You can purchase the extension via the...
  12. J

    3D 3D Camera Yaw, Pitch, Roll

    Hello all, I'm trying to create a 3D Camera in GMS2 that has Yaw, Pitch and Roll. I managed to get the Yaw and Pitch working however I can't seem to get the Roll working properly. Any help with this would be greatly appreciated. Code: if keyboard_check(ord("A")) cam_yaw -= 10; if...
  13. FrostyCat

    Asset - Extension GMLinear 2: Easy matrix and vector operations for GMS 2.3.3+

    GMLinear 2 Easy matrix and vector operations for GMS 2.3.3+ Overview GMLinear is an implementation of matrix and vector operations in pure GML. You can use it to simplify many common calculations in 2D and 3D geometry and implement algorithms/formulas involving linear algebra. Features Easy...
  14. F

    vine swing

    So I am making pitfall and need to be able to have a player object swing on the vine that hangs from the ceiling of the room the vine starts in image angle at 315 and swings to 225 then reverses my teacher mentioned transformation/rotation matrices but I'm not sure how to enter/use them.
  15. C

    GML Matrix Multiplication Optimizations? [Solved]

    Hello! I've found myself in the position of needing to multiply two very large matrices to get the result I want. Because GMS 2 does not (as of yet) support true matrix functions, I am using two ds_grids to represent my matrices. The problem is speed. I've done some questionable things to make...
  16. R

    3D Enter the Matrix: How to check current rotation?

    Hi, While working on a 3d project, I've used matrix_multiply to rotate a character and based his movement of his rotation. In other words, the character changes direction by rotating: var _r = matrix_build(move,0,0, rotate,0,0, 1,1,1); m = matrix_multiply(_r,m); While trying to find the current...
  17. Adrien Dittrick

    HTML5 Gun Kata game: Bullet flow

    https://gamejolt.com/games/buletflowproto/348279 This game is sort of a mechanical engine to test a few thngs for a possible future project which would feature actual graphics and nice bullet-time animations. The system itself is heavily inspired by XCOM cover mechanics, and will be...
  18. bsabiston

    rotation matrix?

    If I want to draw a vertex buffer object at say 90 degrees rotated, do I have to build my own rotation matrix? I don't see any simple matrix manipulation functions, like rotate, scale, translate. And it says 'd3d_transform_set_rotation_z' is no longer recognized. Am I missing the regular...
  19. Octopus_Tophat

    GameMaker Sprites culling when manually manipulating matrices

    Hi, I'm not using cameras in my game for complicated reasons that I don't really feel like explaining. I basically have my own draw pipeline, where the main game control object handles all the drawing for my custom cameras. So my custom cameras are manipulating the matrices while setting...
  20. TheOnlyWRT

    Rotating a matrix

    Is there a way to rotate a matrix in GMS2? Here is an example: If not, is there an extension or a script that exists to do so?
Top