MrIslomaniac
-
Posts
103 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by MrIslomaniac
-
-
That sometimes happens to me, but i disabled the console for the release version =)
http://www.leadwerks.com/wiki/index.php?title=Setting_Up_Visual_Studio_2008_C%2B%2B_Express at the bottom
-
I think that the mat file has to be changeg, just like mg's, but unfortunately microsoft office access table is assigned to .mat files and i can't open them ...
=(
File Extension .MAT - Microsoft Access Table Shortcut
//Ok got that working now
The light somehow isn't. can you send me the model you are using? maybe that will work ...
//I just tried the model in the editor as well and there it works oO something i have to consider when putting this in the .exe?
//light and sun: TEntity cam=CreateCamera(); CameraClearColor(cam,Vec4(0,0,1,1)); TLight light1 = CreatePointLight(1000,0); //and here is the rendering loop: UpdateWorld(); //Render the scene SetBuffer(buffer); RenderWorld(); //Render lighting SetBuffer(BackBuffer()); RenderLights(buffer); //Swap the front and back buffer Flip(0);
-
A simple point light in the middle of my scene and a loaded model of a sphere (i also tried create sphere,same result) returns this:
http://img535.imageshack.us/img535/3923/sun.jpg
This is for a school project, where the sun in the middle of the scene casts shadows on the planets aroound it. The sun you see in the picture is in Vec3(0,0,15).
I need help -.-
-
Ok heres the next thing:
when I do this
SetColor(Vec4(0.5,0.5,0.5,1)); DrawRect(0,0,100,100);
The texture is a little bit transparent, anyone knows why?
P.S. no SetBlend(Alpha) is being used
=(
-
Thanks for those fast answers =) you guys are awesome
:D
-
Why does SetColor(Vec4(150,200,100,255)); return white? =(
Dustin
-
Ok I'll make some of these this weekend and post some pics here.
-
I just wanna practice modeling a little bit, so i would appreciate if you could give me something to model
If the final product looks good to you, I can even upload it
Thanks guys for your help
P.S. I don't model characters
-
GetParent(pick.entity) did it =) never thought of that xD
Thank you Rick
-
Where are you sending the message to the entity? Can we see that code?
if (KeyHit(KEY_E)==1){ if((CameraPick(&pick, cam,Vec3(GraphicsWidth()/2,GraphicsHeight()/2,1),50))!= NULL){ SendEntityMessage(pick.entity, "Open"); } }
-
Nope that does not help =( Thanks anyway
P.S. i did not put the whole code in here:
8code]
TModel Cube = LoadModel("abstract::oldtree.gmf");
SetEntityKey(Cube,"Health","100");
EntityColor(Cube,Vec4(1,1,1,255));
ScaleEntity(Cube,Vec3(1,5,1));
PositionEntity(Cube,Vec3(x,y-1.25,z));
EntityType(Cube,1);
SetEntityCallback(Cube,(byte*)MessageReceiveCallback,ENTITYCALLBACK_MESSAGERECEIVE);
[/code]
-
Hey mates
MessageReceiveCallback does not seem to work with an entity Loaded from a file!
Anyone experienced that as well? Or maybe found a solution?
I would be happy to hear one
Cya
TEntity Cube = LoadModel("abstract::tree.gmf"); SetEntityCallback(Cube,(byte*)MessageReceiveCallback,ENTITYCALLBACK_MESSAGERECEIVE); And void _stdcall MessageReceiveCallback( TEntity entity, str message, byte* extra ) { char str[256]; sprintf(str, "%d got a message. Message name: \"%s\"", (int)entity, message); MessageBox(0, str, "MessageReceiveCallback called", 0); }
It does work correctly if i don't load the file but use CreateCube(0);
-
Good Evening Ladies and Gentlemen
I just faced another problem:I load a model and when i collide with it, I go through it and then everything gets weird, watch it for yourself =)
This is the code I am using:
The model: TBody Hummer = LoadModel("abstract::hummer.gmf",0); PositionEntity(Hummer,Vec3(5,0,0)); EntityType(Hummer,2); SetBodyMass(Hummer,100); and the controller: TController LocalPlayer=CreateController(1.8,0.45,0,50); EntityType(LocalPlayer,1); SetBodyMass(LocalPlayer,80); SetBodyBuoyancyMode(LocalPlayer, 1);
HELP
-
/me is really interested in some kind of terrain decals that are also aligned to the terrain they are on =)
keep me posted
Dustin
-
Hi JGuys
Here is the thing:
I am trying to elevate the terrain at any x and y coordinates with this code:
for(int i = x+256;i<x+256+5; i++){ for(int o = y+256;o<y+256+5; o++){ SetTerrainHeight(Terrain, o, i, TerrainHeight(Terrain,o,i)+0.001 ); } }
the +256 is because the terrain 0,0 is at -256,-256
The terrain raises in physics, but does not raise in visual(but somewhere else)
Here is a pic:
http://img202.imageshack.us/img202/1366/weirdh.jpg
I hope you can help me...
I would even say that there is a mistake in Josh's code ...
When I move on the Z Achsis and i get physics on Z achsis, but the visual on X- achsis ...
Posted it in the Bug Tracker: http://leadwerks.com/werkspace/index.php?/tracker/issue-66-small-axis-mistake/
-
Since that is the complete code, no
Ok that works now =) thank you!
Thought that i can't do that because it requires a TBody ...
Happy
-
I just made a new Player class for me but my controller now does not seem to work anymore, it just get stuck in the air where it is created(neither gravity nor collision).
I also tried the tutorial for controllers, but that does not work either ... any clues?
#include "engine.h" int main(int argc, char** argv) { Initialize(); //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)); Collisions(1,2,true); //Load a model TModel scene=LoadModel("scene.gmf"); if (scene==0) { MessageBoxA(0,"Error","Failed to load model.",0); goto exitapp; } EntityType(scene,2); //Create a light TLight light=CreatePointLight(); PositionEntity(light,Vec3(0,5,0)); //Create a render buffer TBuffer buffer=CreateBuffer(800,600,BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); TController player=CreateController(); EntityType(player,1); SetBodyDamping(player,0.0); SetWorldGravity(Vec3(0,-20,0)); 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,strafe,jump); //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(); }
I think I am just missing something like SetCollision or SetMass ...
Greetz
-
Would LoadTerrainAlphamap or BlendTerrainTexture(Terrain,x,y,0,1); fix that problem?
//Got it working =)
Thanks you 2
-
Hi guys
I am trying to make some examples for the terrain section of the wiki. Does anyone see my mistake?
SetTerrainTexture(Terrain,Sand,0,0); SetTerrainTextureConstraints(Terrain,0,45,0,5,0); SetTerrainTexture(Terrain,Gras,0,1); SetTerrainTextureConstraints(Terrain,0,90,5,10,1);
I have the Sand texture everywhere ...
Greetz =)
-
ok, I don't know about anyone else, but the site is getting worse....
I hope there is plans to fix what was taken off.
I totally agree with you =)
-
SOLVED
Found the problem:
SetBlend(BLEND_ALPHA);
...
-
Hard to say from that picture, but looks like you might be inside the terrain.
Well yeah that's what i already told ya =) I am right in the terrain. When i zoom out, it doesn't render anymore, that's why i took that screenshot ...
Maybe FlipMesh( terrain ); and UpdateMesh( terrain );?
How can I flip a Mesh, when I create a Terrain?
Greetz
-
Sounds like the normals are inverted for some reason. You sure you are above it and your camera isn't just upside down?
In the picure i am right in it ...
When I am over it, you can't see it
-
Good evening fellas
I tried to load a terrain I created with the editor but I seem to be missing something
TTerrain Island = CreateTerrain(512); LoadTerrainHeightmap(Island,"abstract::Alpha_height.raw"); LoadTerrainAlphamap(Island,"abstract::Alpha_alpha.dds");
It just does not render correctly ... When I am over the terrain, it does not render at all, when I am under it it looks normal.
Can someone give me a hint?
Dustin
Vegetation Layers
in Suggestion Box
Posted
Can we have a function like this?
LoadTerrainVegetationLayer( TEntity terrain, str path, int Layer )
Would be great =) thanks