Search found 18 matches

by Delee
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...
by Delee
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

Thanks for your help Luben. :) And I did post on the Newton forums, but they are usually so slow to reply and often do not. People on Irrlicht are always very helpful, and once again I appreciate it very much. Again, my thanks!
by Delee
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. :)...
by Delee
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 ...
by Delee
Tue Apr 17, 2007 5:11 am
Forum: Beginners Help
Topic: Camera rotation is always up?
Replies: 3
Views: 188

Oh and also, even if following my modification of the object's rotation, I set the camera rotation to 0 on all points, it still ends up looking at the ceiling.
by Delee
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...
by Delee
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 ...
by Delee
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...
by Delee
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...
by Delee
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...
by Delee
Mon Apr 16, 2007 1:10 am
Forum: Beginners Help
Topic: Some simple organization questions.
Replies: 22
Views: 1143

Not really... for examples I generally prefer everything to be in one function as it is easier to follow. Do you have problems passing Irrlicht objects? IrrlichtDevice *device = createDevice(EDT_DIRECT3D9, dimension2d<s32>(640, 480), 16, false, false, false, &receiver); IVideoDriver *videoDriver...
by Delee
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...
by Delee
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...
by Delee
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...
by Delee
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...