Search found 5 matches

by DmitryKonung
Tue Dec 05, 2017 1:37 pm
Forum: Advanced Help
Topic: Simple Node rotation by quaternion
Replies: 9
Views: 3478

Re: Simple Node rotation by quaternion

Thank you, CuteAlien. Sorry, it`s hard to understand me, I ‘am junior in 3d. And I very grateful for your help!
on every frame I have new absolutely values of yaw, pitch and roll. For example: for Yaw 40.1->40.2->40.3 degrees. And now I need to rotate my node on this angles (in absolutely ...
by DmitryKonung
Fri Dec 01, 2017 9:17 am
Forum: Advanced Help
Topic: Simple Node rotation by quaternion
Replies: 9
Views: 3478

Re: Simple Node rotation by quaternion

Here is minimum possible code of my programm:

May be a heve wrong Node axis orientation... :?


#ifdef _MSC_VER
// We'll also define this to stop MSVC complaining about sprintf().
#define _CRT_SECURE_NO_WARNINGS
#pragma comment(lib, "Irrlicht.lib")
#endif

#define _USE_MATH_DEFINES

#define ...
by DmitryKonung
Thu Nov 23, 2017 12:01 pm
Forum: Advanced Help
Topic: Simple Node rotation by quaternion
Replies: 9
Views: 3478

Re: Simple Node rotation by quaternion

//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// Given 2 euler rotations find a quaternion describing the relative rotation from the old to the new rotation
irr::core::quaternion getRelativeRotation(const irr::core::vector3df& oldRotationEulerDeg, const irr::core::vector3df& newRotationEulerDeg ...
by DmitryKonung
Thu Nov 23, 2017 8:10 am
Forum: Advanced Help
Topic: Simple Node rotation by quaternion
Replies: 9
Views: 3478

Re: Simple Node rotation by quaternion

Thanks, CuteAlien.
But, all methods works incorrectly. The Node has wrong orientation. ((
May be I need inverse some axis...
by DmitryKonung
Wed Nov 22, 2017 5:37 am
Forum: Advanced Help
Topic: Simple Node rotation by quaternion
Replies: 9
Views: 3478

Simple Node rotation by quaternion

Please help me!
I need to rotate Node on yaw, pitch, roll angles, and I try to do this by setRotation function, but this method has gimbal lock problem.
I know what my problem can be solved by using quaternions, but I can`t understand HOW.
How can I rotate Node (not shader) by quaternion?