Dampire
Member
|
Matrix rotation.
I need to make a bullet, which fly forward and rotates on its axis. How I can do it?
When I do so
Code:
m.setRotateX(Time.time()* angle_delta);
m.move(new_pos);
bullet has no direction...
When I do so
Code:
m.setRotateX(Time.time()* angle_delta);
m.setPosDir(new_pos, dir);
bullet has no rotation.
|
|
08-03-2010 10:29 AM |
|
Esenthel
Administrator
|
RE: Matrix rotation.
in the main loop you can do m.orn().rotateX(Time.d())
|
|
08-03-2010 11:46 AM |
|
Dampire
Member
|
RE: Matrix rotation.
Yep, it's work. Thank's.
But the code is a bit different
Code:
m.orn.rotateZVec(Time.d());
In any case, thanks
|
|
08-03-2010 03:59 PM |
|
Arikin
Member
|
RE: Matrix rotation.
Huh, I've similar problem, but this solution doesn't work. I have Player class based on Chr struct... When e.g. I look up, head goes up too... And I need rotate whole Player as head is rotating. I tried many codes in many places but it doesn't work. Can you help me?
|
|
08-11-2010 06:41 PM |
|