Search found 18 matches
- Wed Apr 25, 2007 1:54 pm
- Forum: Beginners Help
- Topic: Matrix to Euler Angles, for all XYZ.
- Replies: 0
- Views: 228
Matrix to Euler Angles, for all XYZ.
Hi everyone. I have been using the following function to convert a rotation along the Y axis to a euler angle. vector3df Camera::getRotationDegrees(vector3df rotation) { vector3df angle = vector3df(0.0f, 0.0f, 0.0f); vector3df target = vector3df(0, 0, 1); matrix4 matrix; matrix.setRotationDegrees(ro...
- Sun Apr 22, 2007 1:17 pm
- Forum: Beginners Help
- Topic: Using Newton to check if an object is in line of sight.
- Replies: 4
- Views: 383
- Sun Apr 22, 2007 7:22 am
- Forum: Beginners Help
- Topic: Using Newton to check if an object is in line of sight.
- Replies: 4
- Views: 383
Using Newton to check if an object is in line of sight.
Hi again everyone. My goal is to determine if an object is in line of sight of another object. For example, if there is a tree impeding the camera's view of the character. I thought this is something that could be done with NewtonCollisionRayCast, but if anyone knows of another way I am all ears. :)...
- Tue Apr 17, 2007 7:27 am
- Forum: Beginners Help
- Topic: Getting the angle of a rotation. getHorizontalAngle?
- Replies: 1
- Views: 201
Getting the angle of a rotation. getHorizontalAngle?
I think I might be doing something wrong. Take for example the following picture. http://www.aniaw.net/_/angle.jpg The object is rotated to face the direction of the red arrow. This works correctly. The rotation is smooth and no problems occur. However, I need to calculate the angle of the rotation ...
- Tue Apr 17, 2007 5:11 am
- Forum: Beginners Help
- Topic: Camera rotation is always up?
- Replies: 3
- Views: 188
- Tue Apr 17, 2007 4:32 am
- Forum: Beginners Help
- Topic: Camera rotation is always up?
- Replies: 3
- Views: 188
Hi, thanks for the help! I did some testing and it appears that changes caused by Newton are messing the camera up. Right at the beginning, the camera is set correctly to display just above and behind the character. cameraNode = sceneManager -> addCameraSceneNode(oNode, vector3df(40, 60, 0), vector3...
- Tue Apr 17, 2007 2:48 am
- Forum: Beginners Help
- Topic: Camera rotation is always up?
- Replies: 3
- Views: 188
Camera rotation is always up?
Hi everyone. I have a simple camera attached to an object within the game. I use the following to create the camera. cameraNode = sceneManager -> addCameraSceneNode(oNode, vector3df(0, 0, 0), vector3df(0, 0, 0), -1); No matter what values I set for the camera rotation, the camera always looks up at ...
- Tue Apr 17, 2007 1:33 am
- Forum: Advanced Help
- Topic: Moving an object with Newton collision.
- Replies: 6
- Views: 719
Thanks a lot for all of your help! :) I finally figured out what I was doing wrong. Everything was working fine for my general shapes as they were not expected to be shifted by the user and only needed to react to collisions. Therefore, when they stopped moving, Newton didn't bother checking on them...
- Mon Apr 16, 2007 1:00 pm
- Forum: Advanced Help
- Topic: Moving an object with Newton collision.
- Replies: 6
- Views: 719
Hi again, thanks a lot for the replies! What roxaz posted is similar to what I thought had to happen. However, when I tried it, pushing forward doesn't do anything. It doesn't look like the callbacks are being called, although they are set correctly as they do get called when the object is added and...
- Mon Apr 16, 2007 8:47 am
- Forum: Advanced Help
- Topic: Moving an object with Newton collision.
- Replies: 6
- Views: 719
Moving an object with Newton collision.
I am curious how you force an object to move with Newton... for example, if I press forward on my keyboard, it will move a ball within the program forward. I have tried to look at the Character Controller tutorial that comes with Newton, but it is much too advanced for my current understanding and f...
- Mon Apr 16, 2007 1:10 am
- Forum: Beginners Help
- Topic: Some simple organization questions.
- Replies: 22
- Views: 1143
- Mon Apr 16, 2007 12:16 am
- Forum: Beginners Help
- Topic: Some simple organization questions.
- Replies: 22
- Views: 1143
What problems do you have passing variables to functions? It is generally considered bad practice to have a lot of global variables. There are many memory problems involved. In the end, it depends on your organisation of the program - sometimes, you cannot avoid a few global variables. In C++, I thi...
- Sun Apr 15, 2007 1:28 pm
- Forum: Beginners Help
- Topic: Cylinders with Newton
- Replies: 5
- Views: 237
I found some code for it on the forums. I'm sorry, I do not remember who wrote it - if it is yours, feel free to yell and scream. :) Here it is, just to make it easy! Header void showCollision(); void NewtonDebugCollision (const NewtonBody* body, int vertexCount, const float* faceVertec, int id); vo...
- Sun Apr 15, 2007 12:49 pm
- Forum: Beginners Help
- Topic: Cylinders with Newton
- Replies: 5
- Views: 237
For further clarification, I turned on debug mode. It appears to be happening to all of the long shapes... rectangles, capsules, cylinders. http://www.aniaw.net/_/debugrectangle.jpg I am somewhat stumped as ovoloid shapes work fine. I have tried shifting the mesh around without much success. I am us...
- Sun Apr 15, 2007 11:10 am
- Forum: Beginners Help
- Topic: Cylinders with Newton
- Replies: 5
- Views: 237
Cylinders with Newton
I was going to post this on Newton's forum, but it is impossible to register for, so I have to do it here. Please excuse me if this is not in the correct forum. Within the following picture, all of the cylinders are at rest. The one at an angle is not moving and identifies the problem. http://www.an...