Search found 8 matches

by thetemplar
Thu Mar 06, 2014 11:31 am
Forum: Beginners Help
Topic: Terrain-Grid, best way
Replies: 14
Views: 1721

Re: Terrain-Grid, best way

Now, the terrain was just flat for the first try, i want to have different heigth and mountains and stuff, so this works pretty well.

But thanks for the tipp :-)

Image
by thetemplar
Thu Mar 06, 2014 12:09 am
Forum: Beginners Help
Topic: Terrain-Grid, best way
Replies: 14
Views: 1721

Re: Terrain-Grid, best way

HA!
I got it after just 5 hours :D


ITriangleSelector* terrainSelector = smgr->createTerrainTriangleSelector(terrain, 0);

This does the trick.

Thanks to the site i finally got the solution from: http://irrlichtirc.g0dsoft.com/kat104/3D/terrain-deformation/index.html

@Whoever wrote the ...
by thetemplar
Wed Mar 05, 2014 9:07 pm
Forum: Beginners Help
Topic: Terrain-Grid, best way
Replies: 14
Views: 1721

Re: Terrain-Grid, best way

Ok, sorry to ask again...

I got my terrain with a selector

scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode("../images/gray.bmp");
ITriangleSelector* selector = smgr->createTriangleSelector(((IMeshSceneNode*)terrain)->getMesh(), terrain);
terrain->setTriangleSelector(selector ...
by thetemplar
Wed Mar 05, 2014 7:26 pm
Forum: Beginners Help
Topic: Terrain-Grid, best way
Replies: 14
Views: 1721

Re: Terrain-Grid, best way

Yes, thanks, I only wanted that keyword so I know what to looking for.

Thanks, great community!
by thetemplar
Wed Mar 05, 2014 5:55 pm
Forum: Beginners Help
Topic: Terrain-Grid, best way
Replies: 14
Views: 1721

Re: Terrain-Grid, best way

One last thing:

I now have a array for my game logic and my drawn terrain.

How do i get the point where the mouse is on the surface of the terrain? I have a RTS-like look-around camera, so the "click" can be anywhere, how can I determin the point where the mouse is?
by thetemplar
Wed Mar 05, 2014 4:25 pm
Forum: Beginners Help
Topic: Terrain-Grid, best way
Replies: 14
Views: 1721

Re: Terrain-Grid, best way

@polylus: Thanks. After reading this, i sort of hit myself for not thinking of this before. Indeed, I wanted to mix rendering and logic, but sure, it is better to have it

@horvatha4: Thanks, I will check it out!

Thanks for the help
by thetemplar
Wed Mar 05, 2014 2:22 pm
Forum: Beginners Help
Topic: Terrain-Grid, best way
Replies: 14
Views: 1721

Re: Terrain-Grid, best way

Hey,
first of all, thanks for the help!
@hendu: Yeah, "ouchy" code, was more to show what i want to do.

I so created a TerrainSceneNode*
scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode("../images/gray.bmp", 0, 777);

I looks nice and runs as fast as i expected it.
But can I access ...
by thetemplar
Wed Mar 05, 2014 1:37 am
Forum: Beginners Help
Topic: Terrain-Grid, best way
Replies: 14
Views: 1721

Terrain-Grid, best way

Hello,
i am new to all of this, so this might be a dumb question, but i found no answer so far.

I want a map out of squares, each contain two triangles, so that every corner can have its own height.

I did something like this:

while (device->run() && driver)
{
[..]
for (double x = 0; x < 100; x ...