Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
matrix and vector math questions
Author Message
nckomodo Offline
Junior Member

Posts: 18
Joined: May 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
nckomodo Offline
Junior Member

Posts: 18
Joined: May 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
MulleDK19 Offline
Senior Member

Posts: 511
Joined: Jun 2009
Reputation: 8
Post: #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 all posts by this user Quote this message in a reply
nckomodo Offline
Junior Member

Posts: 18
Joined: May 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
nckomodo Offline
Junior Member

Posts: 18
Joined: May 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)