Search found 22 matches

by panto
Wed Sep 28, 2011 12:06 pm
Forum: Advanced Help
Topic: Mesh normals not changing or messed up after altering mesh?
Replies: 3
Views: 527

Re: Mesh normals not changing or messed up after altering me

Thanks, it worked. It is quite costly. For now I've figured out an alternate (call setScale only once I'm doing editing vertices).

However, why doesn't sceneManager->getMeshManipulator()->recalculateNormals( meshBuffer); work? It doesn't seem to be as costly as setScale.
by panto
Tue Sep 27, 2011 7:00 pm
Forum: Advanced Help
Topic: Mesh normals not changing or messed up after altering mesh?
Replies: 3
Views: 527

Mesh normals not changing or messed up after altering mesh?

Hi, So I wrote a basic terrain editor. My terrain has a shader which uses normals (NORMAL semantic) to calculate lighting and the texture blending. However, whenever I alter the mesh's vertices's positions manually, then the shader won't update the lighting/texture on the mesh itself until I've comp...
by panto
Sun Sep 25, 2011 8:48 pm
Forum: Beginners Help
Topic: Raycasting not accurate after manually altering mesh?
Replies: 2
Views: 289

Re: Raycasting not accurate after manually altering mesh?

I thought that when "refreshing" the mesh (node->setPosition( node->getPosition() )) it would automatically recalculate the terrain triangle selector. But I'm probably wrong, I'll check it out, thanks.
by panto
Sun Sep 25, 2011 7:05 pm
Forum: Beginners Help
Topic: Raycasting not accurate after manually altering mesh?
Replies: 2
Views: 289

Raycasting not accurate after manually altering mesh?

Hi, I use a very simple raycast function to get the Y height of the collision point from the camera to the terrain (cast ray from camera->getPosition() to camera->getPosition() + vector3df( 0, -10000, 0 ) ). However, after manually moving the terrains vertices up/down, the Y position of the ray stay...
by panto
Wed Mar 23, 2011 1:12 pm
Forum: Project Announcements
Topic: TrollBrad [Free][RPG+RTS][WIP][TECHDEMO]
Replies: 35
Views: 14721

It's quite epic, well done. :)
by panto
Wed Mar 23, 2011 1:10 pm
Forum: Beginners Help
Topic: Animation not displayed/rendered?
Replies: 2
Views: 290

Solved. I exported the .X mesh with wrong options, thanks to Bear_130278 for a helpful post which I found in the forum somewhere.

If anyone has this issue, just post here and I will tell you exactly what to do.
by panto
Wed Mar 23, 2011 1:05 pm
Forum: Project Announcements
Topic: irrBP - An Irrlicht - Bullet Physics Wrapper
Replies: 200
Views: 113059

Does anybody have a idea how I could implement a simple function like bool OnGround() using IrrBP? I know how to do it with the default Irrlicht collision manager (shoot a ray from character base position to -10 by Y axis from character base position - if collided, then the char is on ground). Edit....
by panto
Wed Mar 23, 2011 11:30 am
Forum: Beginners Help
Topic: Animation not displayed/rendered?
Replies: 2
Views: 290

Animation not displayed/rendered?

So.. I imported a .X file which has a walk animation from frames 1-25. Whenever I press KEY_KEY_W I want the model to play the animation. This is the code I have currently. if( torsoNode ) { f32 frameNumber = torsoNode->getFrameNr(); if( frameNumber < 1 || frameNumber > 25) frameNumber = 1; torsoNod...
by panto
Sun Mar 20, 2011 5:57 pm
Forum: Beginners Help
Topic: [Solved] Camera view messed up?
Replies: 11
Views: 534

Yeah, and then the FPS also drops drastically for some reason.
by panto
Sun Mar 20, 2011 5:46 pm
Forum: Beginners Help
Topic: [Solved] Camera view messed up?
Replies: 11
Views: 534

I tried to reproduce it, but I can't. It seems the problems root is deeper within my code.. :/

Here's what I'm basically doing, though. (pastebin links).
main.cpp
BugCulprit.h
BugCulprit.cpp
by panto
Sun Mar 20, 2011 5:08 pm
Forum: Beginners Help
Topic: [Solved] Camera view messed up?
Replies: 11
Views: 534

When I comment that snippet of code, then it renders fine ... This is what I exactly do. 1) Create "Player" class before main loop. 2) In the main loop, I call player->Rotate(), which is basically this: //offset is a vector3df. //cameraDirection is f32. vector3df rootPos = rootNode->getPos...
by panto
Sun Mar 20, 2011 4:58 pm
Forum: Beginners Help
Topic: [Solved] Camera view messed up?
Replies: 11
Views: 534

Click me!

All I'm drawing is a IAnimatedMesh and a ILight.
by panto
Sun Mar 20, 2011 4:50 pm
Forum: Beginners Help
Topic: [Solved] Camera view messed up?
Replies: 11
Views: 534

I've traced the error to these lines: vector3df rootPos = rootNode->getPosition(); camera->setTarget( rootPos ); camera->setPosition( rootPos + offset ); rootNode->setRotation( vector3df( 0, cameraDirection, 0 ) ); If I uncomment those lines of codes, then there's no graphical glitches. Btw, even if...
by panto
Sun Mar 20, 2011 4:38 pm
Forum: Beginners Help
Topic: [Solved] Camera view messed up?
Replies: 11
Views: 534

[Solved] Camera view messed up?

I'm trying to create a camera by writing this before the main loop.

ICameraSceneNode *cam;
cam = sceneManager->addCameraSceneNode();


It does create the camera.. however, the camera only displays half of the screen. The upper half is completely gray. Why is this so?
by panto
Fri Mar 18, 2011 6:03 pm
Forum: Project Announcements
Topic: irrBP - An Irrlicht - Bullet Physics Wrapper
Replies: 200
Views: 113059

Zurzaza wrote:...can only be used with bullet 2.77...
Oh my god, I seriously wish you would've told me that earlier.

Compiled now. So far so good! Nice!