MV3D - 3D rendering for RMMV with Babylon.js

Alright so I tried it and here's what happened. The controls work fine when facing forward or backwards, but they invert when you turn the camera to the right or the left. Here's a video showcasing this, I press W, S, A, and D and I go forward, backwards, left and right just like normal. I then turn the camera to the right and do the exact same thing and W now sends me backwards, S sends me forwards, etc.
Alright so I tried it and here's what happened. The controls work fine when facing forward or backwards, but they invert when you turn the camera to the right or the left. Here's a video showcasing this, I press W, S, A, and D and I go forward, backwards, left and right just like normal. I then turn the camera to the right and do the exact same thing and W now sends me backwards, S sends me forwards, etc.

I see.
But if that is all that is wrong, this is great progress.
Let's try subtracting the camera yaw instead of adding now:

JavaScript:
var _mv3d_SAN_AM_PlayerMover_updateVelocityByInput = PlayerMover.prototype.updateVelocityByInput;
PlayerMover.prototype.updateVelocityByInput = function() {
    _mv3d_SAN_AM_PlayerMover_updateVelocityByInput.call(this);
    if (!mv3d.isDisabled()) {
        var velVecLen = this._velVec._len + 0.0;
        var velVecDir = (this._velVec._dir - Vector.degToRad(mv3d.blendCameraYaw.currentValue()))%(Math.PI*2);
        this._velVec = Vector.polar(velVecLen, velVecDir);
    }
};
Just tried it, everything works perfectly now, thank you so much for the help 🙂 . Controls are consistent in all directions. Just one question, am I able to look up or down with the mouse, and if yes, how so? I haven't explored MV3D's options all that much yet.
Not sure. In third person you can set it to control the camera with the mouse but never tried in first person.
That said, the way it is implemented in third person is not my favorite. Every movement of the mouse changes the camera, not when you hold a key or something.

But I do know someone named AmalgamAsh once made a plugin to improve controls on a gamepad, maybe that would help?
I having a problem them when i dash my character go though walls i dont know if is a problem with the plugin our rpg maker mv, has anyone encouter this problem too?
Hello, not sure if this has been answered already but I keep getting this error on startup and I haven't found a way to fix it. I tried on both just the demo and on my own project. Mycurrent rpg maker mv version is 1.5.1
29629762392.png
Hello, not sure if this has been answered already but I keep getting this error on startup and I haven't found a way to fix it. I tried on both just the demo and on my own project. Mycurrent rpg maker mv version is 1.5.1View attachment 245845
It only works on rpg maker 1.6.1 and above (well, technically 1.6.2 is the exact same thing anywhere but in japan, all it had as a change from 1.6.1 was a japan-exclusive feature removed)
That is because it requires features of javascript ES6, something that was only added properly on those versions.
It only works on rpg maker 1.6.1 and above (well, technically 1.6.2 is the exact same thing anywhere but in japan, all it had as a change from 1.6.1 was a japan-exclusive feature removed)
That is because it requires features of javascript ES6, something that was only added properly on those versions.
Thank you so much!
@Dread_Nyanak and @Zekken and whoever else said they wanted SRD's Character Creator Ex compatible with this...
I did it! It was complicated, stressed me for a bit and everything, but now I tested it and I'm pretty sure all CCEx does on normal sprites this one allows with the 3d characters.
It was not easy, but actually doing it is so satisfying...

I put all CCEx plugins, that is SuperTools, the original and my enhancement plugin (but I'm pretty sure you won't need it), above mv3d, and this one bellow it.
it isn't working, it keeps giving me the error message Cannot read property "hasSetImage" of undefined
are you putting my plugin bellow both character creator ex and mv3d in the plugin manager? Because plugin order matters in rpg maker, and this error seems to be from something my patch checks from those two that is not there.

else... something from the more recent versions, maybe? There have been some time since I made it...
I'll have to look into it later.
Not sure why this issue is happening but I'm using MZ3D and Visustella Events Movement Core and for some reason the plugin command that allows you to add icons to events does not work with MZ3D on. It doesn't produce an error in the console or anything, just no event icon shows up.
Not sure why this issue is happening but I'm using MZ3D and Visustella Events Movement Core and for some reason the plugin command that allows you to add icons to events does not work with MZ3D on. It doesn't produce an error in the console or anything, just no event icon shows up.
Why it happens is: MZ3D, as well as MV3D, makes a 3d model of the map and shows it instead of the 2d one. The 2d one is still there, but invisible and covered by the 3d one.

That means any visual effects that would affect the 2d map need to be adapted to the 3d one, or they will either not be visible at all, be under the map, or over the map like a hud.

If over the map like a hud there is a chance it may still appear properly, after all mv3d had screen position aliased from the very early versions so things like Yanfly's Message Core could position the message box over the player and events. But if it is set on the same layer as the map... then no, it won't show up unless someone made a patch.
Why it happens is: MZ3D, as well as MV3D, makes a 3d model of the map and shows it instead of the 2d one. The 2d one is still there, but invisible and covered by the 3d one.

That means any visual effects that would affect the 2d map need to be adapted to the 3d one, or they will either not be visible at all, be under the map, or over the map like a hud.

If over the map like a hud there is a chance it may still appear properly, after all mv3d had screen position aliased from the very early versions so things like Yanfly's Message Core could position the message box over the player and events. But if it is set on the same layer as the map... then no, it won't show up unless someone made a patch.
ohh okay that makes more sense now, thanks!
Is there any way to toggle this plugin on the fly? I'm planning a sequence in my game where MV3D is used to mimic the original DOOM, and while I've got it fully working, I don't want the plugin to be active outside of this portion of the game.
Is there any way to toggle this plugin on the fly? I'm planning a sequence in my game where MV3D is used to mimic the original DOOM, and while I've got it fully working, I don't want the plugin to be active outside of this portion of the game.
You can just set on the plugin's map defaults parameter to have added either "disable()" or "enable(false)". Then you can set on the settings of the maps you want it to work "enable()" or "enable(true)".

I don't remember if you can turn it on or off mid-map without a script call, but... making a map that works just as well in the original 2d and in 3d with this plugin is... quite annoying, so your better options if you want to use a single map with both versions are to either have a separate version of each or to set the camera in a way that makes it seem 2D (the more recent versions even have a "2D projection" camera mode for that use).
Sorry if this is a dumb question, I'm really new to tinkering with plugins but where would the settings for the map be? Is it in the plugin parameters or is it somewhere else?
Sorry if this is a dumb question, I'm really new to tinkering with plugins but where would the settings for the map be? Is it in the plugin parameters or is it somewhere else?
ok, so

MV3D is a hard plugin to learn, thankfully both the free and paid versions also let you download a sample project with examples of how it is used.

Plugin Parameters are the parts on the right side of the plugin when you instal and double click on them (the left half being a help file).
In there there is one parameter for default map settings, that is every map will have that be their settings unless you overwrite it on the map itself.
To be more specific, there is a "setting" (more to be used as a folder in this case, as you can put others inside it) called "Map Settings", and inside it is one named "Map Defaults".
In there, you add a line with just "disable()" or "enable(false)" (well, it already comes with a line saying "enable(true)" so... just change that true to false?) so every map is without the 3D by default.

Now, on the map themselves, you need to open the map's settings (where you change its name, map size etc), go to the notebox and add in an mv3d noteblock (that is, in one line you put <mv3d>, another with </mv3d>, and put the code to be read between the two) and in there put "enable(true)" so that map is run in 3D. Plus any camera, ceiling, fog color and light changes your map needs.
So, at minimum, something like
<mv3d> enable(true) </mv3d>
So good news, the switch works! Bad news though is that the map doesn't seem to load after I transfer the player. Pictures and menus still work though, which seems odd... Is there something I'm missing?
1680660495531.png
1680662728303.png
@UnforseenUplink what is your version of mv3d?
Recently, the creator had changed the way data is read and loaded, but with that some computers could not render the 3d map like you say happens to you, or could not read some of the external files. The first did not happen to me, but the second did.
But she released a version with these issues not long after. Try updating yours. The most recent is 9.2.2, I think
I'm using the demo version included in the demo project at the start of this thread iirc

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