Search found 13 matches

by SomeGuyWithAComputer
Fri Sep 13, 2024 1:09 am
Forum: Advanced Help
Topic: How do I make a gun turret that is child of a node point at another node in the root scene?
Replies: 5
Views: 174

Re: How do I make a gun turret that is child of a node point at another node in the root scene?

hold on, parentTransform.setTranslation(core::vector3df(0,0,0)) doesn't result in the same behavior as this parentTransform[12] = 0; parentTransform[13] = 0; parentTransform[14] = 0; parentTransform[15] = 0; i'll start trying both methods every time i change and check something. The following code m...
by SomeGuyWithAComputer
Thu Sep 12, 2024 9:56 pm
Forum: Advanced Help
Topic: How do I make a gun turret that is child of a node point at another node in the root scene?
Replies: 5
Views: 174

Re: How do I make a gun turret that is child of a node point at another node in the root scene?

hmm, i had already tried separating them vs not separating them before posting that. What visually happens and the rotational axis values are often useless and inconclusive. (x and z axises are combined based on whatever the quaternion algorithms say to do and whatnot). In my above attempt (with com...
by SomeGuyWithAComputer
Mon Sep 09, 2024 12:52 am
Forum: Advanced Help
Topic: How do I make a gun turret that is child of a node point at another node in the root scene?
Replies: 5
Views: 174

Re: How do I make a gun turret that is child of a node point at another node in the root scene?

Do you know how to change the last row of a matrix to 0 like that in irrlicht 1.8? I think setTranslation() should do it. Is there a better way to do it? Thanks for the warning about scaling, I've been really careful to make sure nothing having to do with scaling ever happens in my project. Anyway i...
by SomeGuyWithAComputer
Sun Sep 08, 2024 10:27 pm
Forum: Game Programming
Topic: How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?
Replies: 11
Views: 790

Re: How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?

I'm using Reactphysics3d. It's ok, but I try to use irrlicht for rotations when possible because it has more stuff. In my experimentation, the absolute angular velocity reactphysics3d returns is less usable than calculating angular velocity by keeping track of irrlicht node angles. Iirc I tried rota...
by SomeGuyWithAComputer
Sun Sep 08, 2024 10:25 pm
Forum: Advanced Help
Topic: How do I make a gun turret that is child of a node point at another node in the root scene?
Replies: 5
Views: 174

How do I make a gun turret that is child of a node point at another node in the root scene?

i'm trying to make it so that a turret on a ship points at another irrlicht ISceneNode. The turret node is a child of the ship. The targets are at the same level as the ship, there is never a situation where a turret needs to target an item that the ship is a child of or that is a child of the ship....
by SomeGuyWithAComputer
Mon Aug 26, 2024 9:54 pm
Forum: Game Programming
Topic: How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?
Replies: 11
Views: 790

Re: How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?

Something occurred to me the other day. If it's not really possible to get the relative angular velocity of an object in physical space because math can't work that way, how does the gyroscope on my phone work? It can handle orientation relative to wherever "flat" is in x,y,z angles as wel...
by SomeGuyWithAComputer
Mon Aug 05, 2024 11:27 pm
Forum: Beginners Help
Topic: Camera is always 1 frame behind, what can I do about it? | 2024 edition
Replies: 4
Views: 430

Re: Camera is always 1 frame behind, what can I do about it? | 2024 edition

welp, false alarm. I thought I had my position lag bugs fixed but I don't. My changes made it so that I can have an object on a moving ship and still be able to get the position of the object that is a child object in the ship and have it be accurate but I can't have an object be a child of that obj...
by SomeGuyWithAComputer
Sun Aug 04, 2024 5:55 pm
Forum: Game Programming
Topic: How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?
Replies: 11
Views: 790

Re: How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?

ok well i'm still working on it. getAbsoluteTransformation().rotateVect(physicsObject.getAngularVelocity()) doesn't quite work but it works certain edge cases. It's hard to test it and find exactly where it goes wrong because I also don't have a way to derive relative velocity which means no linear ...
by SomeGuyWithAComputer
Fri Aug 02, 2024 1:08 am
Forum: Game Programming
Topic: How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?
Replies: 11
Views: 790

Re: How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?

Would it be possible to convert that getAngularVelocity() vector into a form that would actually work with rotateVect()? Your idea is the most correct sounding thing I've heard all day. How do I convert it to a 3x3 matrix? I believe (but haven't proven) that the units from getAngularVelocity() are i...
by SomeGuyWithAComputer
Thu Aug 01, 2024 8:02 pm
Forum: Game Programming
Topic: How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?
Replies: 11
Views: 790

Re: How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?

An idea I got while brainstorming is make 3 "virtual" angularVelocity sensors that are attached to the ship's scene node. One faces forward, one faces upward and one faces to a side. They then keep track of their current rotation along with whatever their rotation value in the last frame w...
by SomeGuyWithAComputer
Thu Aug 01, 2024 5:28 pm
Forum: Game Programming
Topic: How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?
Replies: 11
Views: 790

How do I get "relative" angular velocity so that I can control pitch, roll and yaw angular velocity on a space ship?

I'm making a spaceship game. I'm using irrlicht for the graphics and reactphysics3d for the physics engine. In this game, the ships have "flight assist" which need to be able to hold yaw, pitch and/or roll angular velocities to a target. The problem I'm running into is there doesn't seem t...
by SomeGuyWithAComputer
Thu Aug 01, 2024 5:19 pm
Forum: Beginners Help
Topic: Camera is always 1 frame behind, what can I do about it? | 2024 edition
Replies: 4
Views: 430

Re: Camera is always 1 frame behind, what can I do about it? | 2024 edition

it turned out that I wasn't quite running updateAbsolutePosition() often enough I guess. For some reason, when I added updateAbsolutePosition() into a loop within updateAllObjects() so that it updated the absolute position for every object when it copies the values from the physics engine to the sce...
by SomeGuyWithAComputer
Sat Jul 27, 2024 4:56 pm
Forum: Beginners Help
Topic: Camera is always 1 frame behind, what can I do about it? | 2024 edition
Replies: 4
Views: 430

Camera is always 1 frame behind, what can I do about it? | 2024 edition

I am having a problem where I'm trying to get the camera to chase an object. For some reason, it actually works when following a node at the root level. If I want to get it to follow a node that is a child of another node, it's always 1 frame behind. Using getAbsolutePosition() only returns the posi...