Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


matrix and vector math questions
nckomodo Offline
Junior Member

Posts: 18
Threads: 4
Joined: May 2010
Reputation: 0
#1
matrix and vector math questions

can anyone point me in the direction of the functions and classes i'd want to use if I were trying to create a particle system at the position of a hud model facing the direction the player is facing?
I'll keep trying and poking around but math was never one of my strong points.
05-25-2010, 02:51 AM
Find
nckomodo Offline
Junior Member

Posts: 18
Threads: 4
Joined: May 2010
Reputation: 0
#2
RE: matrix and vector math questions

ok, I give, i have absolutely no idea what to do.
closest I can get is having the steam shoot off to the right of the hud model but I cant seem to get it rotated to the proper direction.
05-25-2010, 10:42 AM
Find
MulleDK19 Offline
Senior Member

Posts: 545
Threads: 21
Joined: Jun 2009
Reputation: 10
#3
RE: matrix and vector math questions

(05-25-2010, 10:42 AM)nckomodo Wrote: ok, I give, i have absolutely no idea what to do.
closest I can get is having the steam shoot off to the right of the hud model but I cant seem to get it rotated to the proper direction.

cCamera3D *pCam = mpInit->mpPlayer->GetCamera();
There you have a reference to the camera.

[Image: 16455.png]
05-25-2010, 01:10 PM
Find
nckomodo Offline
Junior Member

Posts: 18
Threads: 4
Joined: May 2010
Reputation: 0
#4
RE: matrix and vector math questions

I still can't seem to wrap my head around the matrix math and I'm getting nowhere at an astonishing rate.
05-26-2010, 12:48 AM
Find
nckomodo Offline
Junior Member

Posts: 18
Threads: 4
Joined: May 2010
Reputation: 0
#5
RE: matrix and vector math questions

Quote:cWorld3D *pWorld = mpInit->mpGame->GetScene()->GetWorld3D();
cParticleSystem3D *pSystem = pWorld->GetParticleSystem("SteamGunEffect");
cCamera3D *pCam = mpInit->mpPlayer->GetCamera();
pSystem->SetMatrix(cMath::MatrixRotate(
cVector3f(pCam->GetPitch(),(pCam->GetYaw()+1.57079633f),pCam->GetRoll()),
eEulerRotationOrder_ZYX));
pSystem->SetPosition(mpEntity->GetWorldPosition());
I've finally got it pointing the right way, almost, if I turn around the pitch seems to invert itself so it points down when I look up.
Any ideas?

I see you.
05-26-2010, 09:40 AM
Find




Users browsing this thread: 2 Guest(s)