MV3D - 3D rendering for RMMV with Babylon.js

Does anyone have experience implementing a jump button feature (preferably through common events) in an MV3D project? One in which you press a button and your player's height increases then decreases. I'll share a few approaches I've tried and my issues with them:

- Using elevation. This is the approach that works the most, however because elevation is relative to the height of the ground under you, if you go over a deep gap your character will dip down suddenly then back up.
- Changing the event's gravity configuration to a negative value then changing it back to normal at the apex of a jump. This approach has the most promise. The issue however is that your character doesn't start to "fall" unless they walk off the edge of a tile so it doesn't work at the press of a button.
- Changing the player's z value as needed. One quirk of MV3D I haven't been able to circumvent is that when you change the Z value of a character there doesn't seem to be a way to reactivate gravity for them, they just stay at the given z value indefinitely.

Any advice is appreciated. Thanks!
Does anyone have experience implementing a jump button feature (preferably through common events) in an MV3D project? One in which you press a button and your player's height increases then decreases. I'll share a few approaches I've tried and my issues with them:

- Using elevation. This is the approach that works the most, however because elevation is relative to the height of the ground under you, if you go over a deep gap your character will dip down suddenly then back up.
- Changing the event's gravity configuration to a negative value then changing it back to normal at the apex of a jump. This approach has the most promise. The issue however is that your character doesn't start to "fall" unless they walk off the edge of a tile so it doesn't work at the press of a button.
- Changing the player's z value as needed. One quirk of MV3D I haven't been able to circumvent is that when you change the Z value of a character there doesn't seem to be a way to reactivate gravity for them, they just stay at the given z value indefinitely.

Any advice is appreciated. Thanks!
I was able to figure out an approach for making a jump button!

In a common event that runs when the Jump button is pressed I put this (the image cuts a little of it off, be sure to check the text version I pasted as well):

1733630087830.png


◆If:Can Jump? is ON
◆Control Switches:#0028 Can Jump? = OFF
◆Control Variables:#0081 Height at Jump Start = $gamePlayer.z
◆Plugin Command:mv3d @p configure gravity(0)
◆Loop
◆Script:$gamePlayer.z = $gamePlayer.z + 0.1
◆If:Script:$gamePlayer.z > $gameVariables.value(81) + 2.5
◆Break Loop
◆
:End
◆Wait:1 frame
◆
:Repeat Above
◆Wait:5 frames
◆Loop
◆Script:$gamePlayer.z = $gamePlayer.z - 0.1
◆If:Script:$gamePlayer.z <= mv3d.getPlatformForCharacter($gamePlayer,$gamePlayer.x,$gamePlayer.y).z2
◆Plugin Command:mv3d @p configure gravity(7)
◆Control Switches:#0028 Can Jump? = ON
◆Break Loop
◆
:End
◆Wait:1 frame
◆
:Repeat Above
◆
:End

The key is that if you change an event's z value directly (e.g. $gamePlayer.z = 10) it will move them there automatically and then apply gravity to them as opposed to using the "mv3d config" plugin command to alter their z configuration.

I have them gain height by setting their gravity to 0 and running a loop every other frame that increments $gamePlayer.z . This loop breaks when they're some distance above their starting height (in my case, 2.5). After it does, I give them a few frames to hold the apex of the jump, then I run a similar loop that decrements their height (if you simply turn their gravity back on, the character falls straight down. By using a decrementing loop, you retain your movement in middair)

To ensure that the player has landed before they can jump again, I have an break condition in second loop where if their current z value is <= the height of the platform at their current coordinates (mv3d.getPlatformForCharacter($gamePlayer,$gamePlayer.x,$gamePlayer.y).z2), they should be considered grounded and thus can jump again and have their gravity set back to whatever it was prior to the jump (in my case, 7).

Be sure to mess around with the timings and height values to change how the jump feels as needed! I haven't tested this too much, but it seems to fix all of the problems I had in my prior post. 🙂
Does anyone have experience implementing a jump button feature (preferably through common events) in an MV3D project? One in which you press a button and your player's height increases then decreases. I'll share a few approaches I've tried and my issues with them:

- Using elevation. This is the approach that works the most, however because elevation is relative to the height of the ground under you, if you go over a deep gap your character will dip down suddenly then back up.
- Changing the event's gravity configuration to a negative value then changing it back to normal at the apex of a jump. This approach has the most promise. The issue however is that your character doesn't start to "fall" unless they walk off the edge of a tile so it doesn't work at the press of a button.
- Changing the player's z value as needed. One quirk of MV3D I haven't been able to circumvent is that when you change the Z value of a character there doesn't seem to be a way to reactivate gravity for them, they just stay at the given z value indefinitely.

Any advice is appreciated. Thanks!
there is now an official extension plugin that adds a jump button already.

also, instead of the z(#) you should try pos(z:#)


How do you set side textures for walls?
do you mean the shape(wall) or tiles that can be used as walls? (which are just tiles with no shape set, given a height. A3 and A4 tiles have a height pre-set on the plugin parameters, but you can change them if needed)

texture() affects all shapes, and if no shape is given this sets the texture for all six sides of the cube.
for setting them by hand, you use top() and bottom() for, well, the top and bottom, side() for all four cardinal sides, and north(), south(), east() and west() for each direction
(here is also inside() for the insides, plus versions for each direction too)

keep in mind that, on A3 and A4 tiles, besides already coming with a height the first and third rows (the "roofs" on the default sets) are given the tiles right bellow them as side texture, unless you change this. the second and forth don't have this change though.
Does anyone else consistently get this warning upon starting up their game?

View attachment 292915
I'm having some issues with lag and crashing upon loading the first map with my game's deployment and I wasn't sure if this might be part of why. Below is the error I get (I've sometimes randomly gotten it when I start a playtest, but was never able to reproduce it. In the deployment, it consistently happens when I load the first map that has MV3D activated.):

View attachment 292916

Edit: My understanding of the warning is that it's having some issues accessing the attribute storage location in the set attribute command. Perhaps because the location doesn't exist for some reason. So maybe in the playtest it's able to ignore it and find some other way to work but in the deployment it actually really needs that location. I'm not sure.

Has your error been resolved? I have the same problem, this error occurs in random parts of the game
Has your error been resolved? I have the same problem, this error occurs in random parts of the game
what is your mv3d version? does it still happen in the most current version?
what is in the console when it does? - not the window, the console
I use version 0.9.2.8 and there was a file called mv3d.js.map that was not in my folder. I put it in and the error changed, but it remains. The strange thing is that this error that crashes the game does not occur on my PC, but when tested on other computers. Worse still, the performance on other computers is terrible, from 2 to 7 FPS in the 3D parts.


Spoiler: ?
Captura de tela 2025-03-11 134327.png
Captura de tela 2025-03-11 134321.png
This is great for the dungeon bit of my project, I've tried to look around but cant find if there is a command to change the render distance? Works well at the default I use but I"d like to be able to up it if they have light sources of varying degree's.
1747507785172.png
1747507814978.png


Any advice for removing that frame where the sprite's entire sheet appears when you use Change Image or swap party members? I imagine plugins that preload certain sprites may help but I thought I'd see if anyone has come up with a solution.

Attempted (failed) solutions:
- Hiding the flicker by setting the sprite alpha to 0 then back to 100 (Sprite goes fully invisible but the flicker still appears)
- Attempting to pre-cache the image using the ImageManager a la Small 'blink' when using "Change Image..." command. (No change)
- Using Set Movement Route > Player > Transparent ON then setting it to OFF (No flicker, but the camera suddenly moves while the characters are invisible then moves back when they're visible again; Perhaps a good solution for characters that the camera isn't targeting but not so much for the player)
did you try galv_imageCache or preload the image by boot?
the entire sheet? as it should already for the actor to load.

I saw it before on another game I was testing, and unsure what the
exact cause it is that does it (mostly during interaction).

you can try swap plugins (place it higher or lower maybe).
It seems no matter what I do, I can't make flat events interactable. I tried setting it to be same layer as player. I tried expanding the hitbox half a tile in each direction. I even tried setting it to above the player. Has anyone encountered this issue before?

It kind of works if I turn QMovement off, but I don't want to do that.
1748355047710.png
Hey folks, how's it going?

Picked up MV3D, been playing with it a lot. I am wondering if there's a way I can adjust the player's flashlight height? I am working on a first person dungeon crawler and the flashlight does not meet the player's height properly, resulting in some goofy lighting effects. Since tables are higher than a "1", events or stuff placed on them will not become illuminated properly.

There is a way to be able to adjust the flashlight height on events, I had assumed there would be a way for players as well but so far I haven't found anything.
Hi everyone, I don't know if this qualifies as going off-topic or not, but I noticed that the MV3D Wiki is down. Does anyone know what might have happened?

Yes, the wiki is down sometimes. I archived it all on the internet archive a while back :

Original thread: https://forums.rpgmakerweb.com/threads/mv3d-3d-rendering-for-rmmv-with-babylon-js.114971/