Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.
In the meantime please join the new Discord Server!
If you have any questions please e-mail me through the Platinum Arts website.
In the meantime please join the new Discord Server!
If you have any questions please e-mail me through the Platinum Arts website.
Changing Controls
Re: Changing Controls
I am not using Lunix, so I had to do trial and error. I only got error.
-
- Support Team
- Posts: 2734
- Joined: January 13th, 2010, 12:42 pm
- Name: Timothy
- IRC Username: I use Steam
- Location: Looking over your shoulder...
- Contact:
Re: Changing Controls
Code: Select all
Index: src/engine/rendergl.cpp
===================================================================
--- src/engine/rendergl.cpp (revision 3240)
+++ src/engine/rendergl.cpp (working copy)
@@ -852,6 +852,9 @@
while(camera1->yaw>=360.0f) camera1->yaw -= 360.0f;
}
+int moveentropy = 0;
+VARP(mouselook, 0, 0, 1);
+
void mousemove(int dx, int dy)
{
float cursens = sensitivity, curaccel = mouseaccel;
@@ -880,13 +883,25 @@
}
camera1->yaw += dx*cursens;
- camera1->pitch -= dy*cursens;
+ if(mouselook)
+ camera1->pitch -= dy*cursens;
+ else
+ moveentropy = clamp<int>(500, -500, moveentropy - dy * cursens * 2);
+
fixcamerarange();
if(camera1!=player && !detachedcamera)
{
player->yaw = camera1->yaw;
player->pitch = camera1->pitch;
}
+
+ if(moveentropy)
+ {
+ player->move = clamp(1, -1, moveentropy);
+ int dt = min<int>(fabs(moveentropy), curtime);
+ moveentropy += (moveentropy > 0) ? -dt : dt;
+ }
+ else if(!mouselook) player->move = 0;
}
void recomputecamera()
If you don't have it there, that's where the file should be. Either the rendergl.cpp file is already there and you add this on, or it's a new .cpp file you need to create yourself. (I'm not on my computer or I'd tell you which it is ;D ) Then compile.

Want a user bar like this one? PM Leo!
Re: Changing Controls
wait, so I just put it anywhere in that file? also, how do I compile it with the engine? i tried the directions posted on wiki, but it didn't work. You are so helpful. I am so close!! Please stick with me!
-
- Support Team
- Posts: 2734
- Joined: January 13th, 2010, 12:42 pm
- Name: Timothy
- IRC Username: I use Steam
- Location: Looking over your shoulder...
- Contact:
Re: Changing Controls
Place it at the end of the file. So you did this?
And used the appropriate programs? i.e. codeblocks and mingw?To compile go into src\windows and open the file named sandbox.cbp. This should start codeblocks.
if this is your first time, codeblocks will prompt you over which compiler to use, it should auto detect the presence of mingw under 'GNU compiler collection'. If not please make sure mingw is installed correctly.
To build the binaries, simply click the build button and codeblocks will take care of building everything.

Want a user bar like this one? PM Leo!
Re: Changing Controls
I don't think you are supposed to put it at the end.
Because I am using Windows and not linux, those instructions don't work. Still, I tried anyways and it didn't work. I am getting desperate, because no matter what i do, its not working. My research leader is not getting frustrated with me and its not a good situation. Would you be able to help in another way possibly?
Thank you
Because I am using Windows and not linux, those instructions don't work. Still, I tried anyways and it didn't work. I am getting desperate, because no matter what i do, its not working. My research leader is not getting frustrated with me and its not a good situation. Would you be able to help in another way possibly?
Thank you
Re: Changing Controls
This is probably a bit late, but I committed a more "proper" patch into sandbox.
I've updated the bianries so you don't have to compile, just follow instructions here
http://www.sandboxgamemaker.com/wiki/in ... evelopment
one that is done, run the FPS module (I only added it there) and type /mouselook 0
I've updated the bianries so you don't have to compile, just follow instructions here
http://www.sandboxgamemaker.com/wiki/in ... evelopment
one that is done, run the FPS module (I only added it there) and type /mouselook 0
This is not a url, clicking it is pointless