Raul Posted April 24, 2010 Share Posted April 24, 2010 I made a RAW file with L3DT and imported in the Editor. I put some trees and a few rocks and wanted to try in my "game". The problem is that my camera is stick to my feet. (see the pic) THis is happening only when I use terrains made by importing RAW files from L3DT. Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Marleys Ghost Posted April 24, 2010 Share Posted April 24, 2010 Are you using a controller ? Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Raul Posted April 24, 2010 Author Share Posted April 24, 2010 Yes Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Marleys Ghost Posted April 24, 2010 Share Posted April 24, 2010 Is there anymore information you can share? I just imported an L3DT raw fine .. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Raul Posted April 24, 2010 Author Share Posted April 24, 2010 I do not know what else to say. There are no problems using the FPSShooter lua scrip in the editor. But when loading in my program... Now I made a terrain from scratch in the editor and is running good. No one had a similar problem until now? Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Marleys Ghost Posted April 24, 2010 Share Posted April 24, 2010 Does the controller fall ? Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Raul Posted April 24, 2010 Author Share Posted April 24, 2010 No. I go up and down on hills like everything is ok. Only that the camera is where my feats are. At least this is the impression I have while moving around. Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Marleys Ghost Posted April 24, 2010 Share Posted April 24, 2010 Well I can only make guess's as all I have to go on is a picture and that you are using a controller. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Raul Posted April 25, 2010 Author Share Posted April 25, 2010 Here there are the map files. The engine version I use is 2.31 Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Raul Posted April 25, 2010 Author Share Posted April 25, 2010 Also here is the code for the "player": It's nothing special. CreatePlayer + UpdatePlayer: void cPlayer::CreatePlayer() { //controller PlayerController=CreateController(1.8,0.45,0.3,46); EntityType(PlayerController,1); SetBodyMass(PlayerController,100); } void cPlayer::UpdatePlayer() { //rotation gx = GraphicsWidth()/2; gy = GraphicsHeight()/2; dx = Curve((MouseX()-gx)/4.0,dx,3.0/AppSpeed()); dy = Curve((MouseY()-gy)/4.0,dy,3.0/AppSpeed()); MoveMouse(gx,gy); CameraPitch = CameraPitch + dy; CameraYaw = CameraYaw - dx; CameraPitch=Clamp(CameraPitch,-89,89); PlayerRotation.X = CameraPitch; PlayerRotation.Y = CameraYaw; //movement PlayerMove=KeyDown(KEY_W)-KeyDown(KEY_S); PlayerStrafe=KeyDown(KEY_D)-KeyDown(KEY_A); if (KeyDown(KEY_LSHIFT)||KeyDown(KEY_RSHIFT)) { if (!ControllerAirborne(PlayerController)) { PlayerMove*=2.0; PlayerStrafe*=2.0; } } float PlayerJump=0.0; if (KeyHit(KEY_SPACE)) { if (!ControllerAirborne(PlayerController)) { PlayerJump=6.0; } } //controller input UpdateController(PlayerController,PlayerRotation.Y,PlayerMove*3,PlayerStrafe*3,PlayerJump,500); PlayerPosition=EntityPosition(PlayerController); PlayerHeadPosition=PlayerPosition; PlayerHeadPosition.Y =PlayerPosition.Y + 1.8; double walkadd=AppSpeed()*Length(GetBodyVelocity(PlayerController)); walktimer+=walkadd; PlayerHeadPosition.Y=Curve(1.0-0.4*sin(walktimer/500.0),PlayerHeadPosition.Y,16); } void cPlayer::SetPlayerPosition(TVec3 NewPlayerPosition) { MoveEntity(PlayerController,NewPlayerPosition); } Main Loop: myPlayer.UpdatePlayer(); RotateEntity(frameworkCam,myPlayer.PlayerRotation); PositionEntity(frameworkCam,myPlayer.PlayerHeadPosition); Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Marleys Ghost Posted April 25, 2010 Share Posted April 25, 2010 Here there are the map files. The engine version I use is 2.31 Well your map worked fine for me in the editor and my FPS project app (Blitzmax): Looking at your code now. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Marleys Ghost Posted April 25, 2010 Share Posted April 25, 2010 also try using drawtext to show you what value PlayerHeadPosition.Y is when you run your program. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Raul Posted April 25, 2010 Author Share Posted April 25, 2010 can you please help me with drawing the values on screen? I tried: DrawText(10,10,myPlayer.PlayerHeadPosition.Y); and I receive: error C2665: 'DrawTextW' : none of the 2 overloads could convert all the argument types Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Canardia Posted April 25, 2010 Share Posted April 25, 2010 The 3rd parameter must be a string, see Wiki. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Raul Posted April 25, 2010 Author Share Posted April 25, 2010 I already done that. I copy paste the sample from the wiki and same error Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Pixel Perfect Posted April 25, 2010 Share Posted April 25, 2010 DrawTextW, as referenced in the error message, is actually the Win32 function DrawText which is probably why it's complaining about the arguments. The compiler is not recognising the parameter set and chosing the right function. Just of the top of my head try something like: char text[255]; sprintf(text,"Player head height is: %.2f",myPlayer.PlayerHeadPosition.Y); DrawText(10,10,text); Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Canardia Posted April 25, 2010 Share Posted April 25, 2010 There's no need to use sprintf, since DrawText does that already, see the Wiki. DrawText(10,10,"%f",myPlayer.PlayerHeadPosition.Y); Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Raul Posted April 25, 2010 Author Share Posted April 25, 2010 Thanks Pixel Perfect. I used your sample to determine the player pos and player head position. It seems the difference between these 2 variables is 0.96 Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Raul Posted May 1, 2010 Author Share Posted May 1, 2010 Someone has any idea about this problem? Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Marleys Ghost Posted May 1, 2010 Share Posted May 1, 2010 Well quickly looking at your code the problem(s) seem to be here: double walkadd=AppSpeed()*Length(GetBodyVelocity(PlayerController)); walktimer+=walkadd; PlayerHeadPosition.Y=Curve(1.0-0.4*sin(walktimer/500.0),PlayerHeadPosition.Y,16); GetBodyVelocity is a Vec3 .. so what will length return here? I thought that was for the length of a str? doesnt curve smooth the transition between two positions? here it seems you are smoothing between 1.0-0.4×sin(walktimer/500.0) and PlayerHeadPosition.Y,16 what happens if you comment out the head bobbing routine? I assume thats what it is? Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Raul Posted May 1, 2010 Author Share Posted May 1, 2010 Yes, it's working now. I took the lines from an example, from Lumooja when I used the old version. The effect didn't work, but it was not a priority that time. Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.