Marleys Ghost Posted February 26, 2010 Share Posted February 26, 2010 did you set your model to scene? 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...
Elmar Posted February 26, 2010 Share Posted February 26, 2010 I include my model to the editor and close the editor. Then i want to use this sbx file as scene. What you mean when you say set the model? Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 26, 2010 Share Posted February 26, 2010 You have to set your models collision parameter in the editor as in the picture above .. double click the model in the scene and then under the physics tab set that model to "scene". Then save the scene. 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...
Elmar Posted February 26, 2010 Share Posted February 26, 2010 Yes i did it when you say...But i didn't feel any difference... Is it necessary to create terrain in every scene? Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 26, 2010 Share Posted February 26, 2010 no, its not necessary. Hae you tried using game mode in the editor to walk on the model ? 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...
Elmar Posted February 26, 2010 Share Posted February 26, 2010 I try it know. Again the same problem. Player with gun moves of scene.. Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 26, 2010 Share Posted February 26, 2010 Not much else I can suggest without the model, more information or example project. 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...
Elmar Posted February 26, 2010 Share Posted February 26, 2010 When i begin game mode on the model, player goes on the ground. Even there are collisions, which i wish already for a long time. There is only problem that as the players hasn't any height... Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 26, 2010 Share Posted February 26, 2010 So the player will collide with the model when you postion it at/on the model, which suggests its a postioning error when you do that with code. The height issue with the controller is probably due to the changes of the position of the origin of the controller, when did you last update? check the fpscontroller.lua (Leadwerks SDK\scripts\games\) has this line: --Position camera camera:SetPositionf(controller.position.x,controller.position.y+1.7,controller.position.z,1) The origin of the controller was moved from the centre to the bottom so you need to have the camera height set right. 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...
Elmar Posted February 26, 2010 Share Posted February 26, 2010 Is it 100% so that, if the player can stands on the model in game mode in the editor, then i can do it with code, that my controller easy can stand, go with collisions on the same sbx file? Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 26, 2010 Share Posted February 26, 2010 Should do, make sure you position the controller over/at the model .. otherwise it has nothing to stand on. 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...
Elmar Posted March 4, 2010 Share Posted March 4, 2010 if you mean the starting height value for the position of the controler then you use PostionEntity as above the Vec3 is three values for that postion Vec3(x,y,z) ... the value for y (5.0 as above) sets the height. Hello, The changing co-ordinates PositionEntity only changes the place of start of my controller. But i want to do tall controller. I think that my controller is creeping. When i change co-ordinates and run the program, controller begin in high and then it returns... Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted March 4, 2010 Share Posted March 4, 2010 Sounds like you need to set the camera postion attched to the controller, try adding 1 to the value. 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...
Elmar Posted March 4, 2010 Share Posted March 4, 2010 Can you show this in code? Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted March 4, 2010 Share Posted March 4, 2010 post your code and I will take a look. 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...
Elmar Posted March 4, 2010 Share Posted March 4, 2010 #include "engine.h" int main(int argc, char** argv) { Initialize(); RegisterAbstractPath("C:\Program Files"); //Create a graphics context Graphics(800,600); //Create a world if (!CreateWorld()) { MessageBoxA(0,"Error","Failed to create world.",0); goto exitapp; } //Create a camera TEntity cam=CreateCamera(); CameraClearColor(cam,Vec4(0,0,1,1)); PositionEntity(cam,Vec3(0,2,-10)); //Load a model TModel scene=LoadModel("abstract::test2_estafet-1.gmf"); if (scene==0) { MessageBoxA(0,"Error","Failed to load model.",0); goto exitapp; } //ScaleEntity (scene, Vec3(10,10,10)); EntityType(scene,2); //Create a light TLight light=CreateDirectionalLight(); RotateEntity(light,Vec3(45,45,0)); //Create a render buffer TBuffer buffer=CreateBuffer(800,600,BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); TController player=CreateController(); PositionEntity(player, Vec3(100.0, 100.0, 100.0)); EntityType(player,1); SetBodyDamping(player,0.0); SetBodyMass(player,1); SetWorldGravity(Vec3(0,-20,0)); Collisions(1,2,true); float move=0.0; float strafe=0.0; TVec3 camrotation=Vec3(0); float mx=0; float my=0; HideMouse(); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); //Main loop while(!KeyHit(KEY_ESCAPE)) { //Camera looking mx=Curve(MouseX()-GraphicsWidth()/2,mx,6); my=Curve(MouseY()-GraphicsHeight()/2,my,6); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); camrotation.X=camrotation.X+my/10.0; camrotation.Y=camrotation.Y-mx/10.0; RotateEntity(cam,camrotation); //Player movement move=KeyDown(KEY_W)-KeyDown(KEY_S); strafe=KeyDown(KEY_D)-KeyDown(KEY_A); //Jumping float jump=0.0; if (KeyHit(KEY_SPACE)) { if (!ControllerAirborne(player)) { jump=4.0; } } //Run if (KeyDown(KEY_LSHIFT)||KeyDown(KEY_RSHIFT)) { if (!ControllerAirborne(player)) { move*=2.0; strafe*=2.0; } } //Set controller input UpdateController(player,camrotation.Y,move*20,strafe*20,jump,500.0f); //Update the world UpdateWorld(); //Position the camera TVec3 playerpos=EntityPosition(player); TVec3 camerapos=EntityPosition(cam); camerapos.Y=Curve(playerpos.Y+1.75,camerapos.Y,2.0); camerapos=Vec3(playerpos.X,camerapos.Y,playerpos.Z); PositionEntity(cam,camerapos); //Render the scene SetBuffer(buffer); RenderWorld(); //Render lighting SetBuffer(BackBuffer()); RenderLights(buffer); //Swap the front and back buffer Flip(); } exitapp: return Terminate(); } Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted March 4, 2010 Share Posted March 4, 2010 So what exactly is it NOT doing? This line sets the controllers height, here example 2.0 TController player=CreateController(2.0); This sets the Cameras height, here example Y+1.75 camerapos.Y=Curve(playerpos.Y+1.75,camerapos.Y,2.0); 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...
Elmar Posted March 4, 2010 Share Posted March 4, 2010 OK, Everything is good yet) How i can load the sky material in this code? Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted March 4, 2010 Share Posted March 4, 2010 you are better off using framework. Then simply place an atmosphere in your scene in the editor. 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...
Elmar Posted March 5, 2010 Share Posted March 5, 2010 But in this sample (with framework) there are no collision between controller and scene. How i can add it? Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted March 5, 2010 Share Posted March 5, 2010 There is, can you elaborate? 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...
Elmar Posted March 5, 2010 Share Posted March 5, 2010 There are no any collision in this sample.. Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted March 5, 2010 Share Posted March 5, 2010 really? thats elaboration? 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...
Elmar Posted March 5, 2010 Share Posted March 5, 2010 what is the elaboration? Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted March 5, 2010 Share Posted March 5, 2010 Details .. 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...
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.