Search found 15 matches
- Tue Nov 18, 2014 12:26 am
- Forum: Beginners Help
- Topic: Rotating Mesh Based on Camera Position
- Replies: 16
- Views: 1498
Re: Rotating Mesh Based on Camera Position
Thanks that helped. I am very new to programming in 3D so not quite sure what I am doing.
- Sun Nov 16, 2014 7:42 pm
- Forum: Beginners Help
- Topic: Rotating Mesh Based on Camera Position
- Replies: 16
- Views: 1498
Re: Rotating Mesh Based on Camera Position
Well right now it is how I want it, but the movement is weird. So pressing 'w' or 's' will move back or forwards respectively, and 'a' or 'd' will strafe the character left or right. Then rotating the camera will also rotate the character the same direction. But when I move the player after I rotate...
- Sun Nov 16, 2014 4:32 am
- Forum: Beginners Help
- Topic: Rotating Mesh Based on Camera Position
- Replies: 16
- Views: 1498
Re: Rotating Mesh Based on Camera Position
I don't think that is my problem. Right now, when I rotate it rotates the player mesh, and the camera automatically rotates so I believe the camera is already linked to the player. Here is the rotation code if ( receiver->IsKeyDown(KEY_LEFT) ){ currentPlayer.rotate(-1); } else if...
- Sun Nov 16, 2014 12:47 am
- Forum: Beginners Help
- Topic: Rotating Mesh Based on Camera Position
- Replies: 16
- Views: 1498
Re: Rotating Mesh Based on Camera Position
Alright, I am trying to fix the camera, because right now, when I rotate the camera the player does not move correctly. Here's the code. void Player::moveForward(){ cam->GetIrrCamNode()->updateAbsolutePosition(); int myX = getX(); int myY = getY(); int myZ = getZ(); core::CMatrix4...
- Sun Nov 09, 2014 10:13 pm
- Forum: Beginners Help
- Topic: Rotating Mesh Based on Camera Position
- Replies: 16
- Views: 1498
Re: Rotating Mesh Based on Camera Position
Alright thanks I got it working, there was some weird movement when I rotated camera, but I'll deal with that later I guess.
- Sun Nov 09, 2014 3:01 am
- Forum: Beginners Help
- Topic: Rotating Mesh Based on Camera Position
- Replies: 16
- Views: 1498
Re: Rotating Mesh Based on Camera Position
I have been messing around with this code trying to get it to work right, and it seems that when I rotate the player and move him, he always moves in the same direction. So it seems like the camera's target vector doesn't change. Unless I am doing something awfully wrong, it should work correctly ( ...
- Sat Nov 08, 2014 8:12 am
- Forum: Beginners Help
- Topic: Rotating Mesh Based on Camera Position
- Replies: 16
- Views: 1498
Re: Rotating Mesh Based on Camera Position
Yeah I see what you mean, but what I was trying to do was for example; if I rotated the camera so that it is looking at the front of the player, and then move forward, the player would turn around and move in the direction of the camera(which would have been behind the player). Hope that makes sense.
- Sat Nov 08, 2014 5:26 am
- Forum: Beginners Help
- Topic: Rotating Mesh Based on Camera Position
- Replies: 16
- Views: 1498
Re: Rotating Mesh Based on Camera Position
No the only thing really happening right now is the camera and the player, there is not really any other objects or nodes and that one move function is basically the only thing in the player class. I set rotation of the mesh when I initiated the player, but that's about it. And also, you said to do ...
- Sat Nov 08, 2014 1:51 am
- Forum: Beginners Help
- Topic: Rotating Mesh Based on Camera Position
- Replies: 16
- Views: 1498
Rotating Mesh Based on Camera Position
I am trying to make it so that when I rotate my camera, my player mesh is rotated in the direction of the camera. The camera seems to rotate sometimes, but not the player mesh. void Player::move(int moveX, int moveZ){ cam->GetIrrCamNode()->updateAbsolutePosition(); core::vector3df tempVe...
- Thu Nov 06, 2014 4:01 am
- Forum: Beginners Help
- Topic: Looking for third person camera
- Replies: 2
- Views: 479
Re: Looking for third person camera
Thanks for the code, it's helpful. But I can't get the event receiver to work. I put a test case inside the KEY_LEFT that just prints out that it worked, and when ever I press the key nothing prints out. EDIT: I fixed it, I didn't have this line in my code anywhere: device->setEventReceiver(receiver);
- Sun Nov 02, 2014 3:51 am
- Forum: Beginners Help
- Topic: Looking for third person camera
- Replies: 2
- Views: 479
Looking for third person camera
Does anyone have an updated class for a third person camera that I could use or look at to base my own on, can't find any in the forums that are relatively recent.
Thanks.
Thanks.
- Mon Oct 20, 2014 2:37 am
- Forum: Beginners Help
- Topic: Mesh falling through Map
- Replies: 6
- Views: 616
Re: Mesh falling through Map
I think I'll use bullet since I plan on using it for other stuff as well, thanks for the help.
- Sat Oct 18, 2014 11:35 pm
- Forum: Beginners Help
- Topic: Mesh falling through Map
- Replies: 6
- Views: 616
Re: Mesh falling through Map
Oh okay, I thought Irrlicht had a game centered collision system in it, any physics engines you would suggest that would mesh well with irrlicht? I know bullets is one.
- Fri Oct 17, 2014 10:01 pm
- Forum: Beginners Help
- Topic: Mesh falling through Map
- Replies: 6
- Views: 616
Re: Mesh falling through Map
It is working now, thanks CuteAlien, but I have another question. Can CollisionResponseAnimators not collide which each other? The camera is walking right through a node that has a CollisionResponseAnimator.
- Sat Oct 11, 2014 6:18 am
- Forum: Beginners Help
- Topic: Mesh falling through Map
- Replies: 6
- Views: 616
Mesh falling through Map
I am following one of the tutorials on collision and trying to get it working. I got the camera to work when colliding against objects, but then I tried to load another mesh in and give it gravity, but it fell through the map. http://pastebin.com/20mmb7Ui This is basically all the code that deals wi...