Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Matching projection head pitch to players in MotS
Matching projection head pitch to players in MotS
2003-01-26, 12:10 PM #1
I know hideki got this to work since he said he did using SetThingJointAngle(). But I can't get that verb to do anything. How do I make the force projections headpitch match the players? I can't figure it out!
2003-01-26, 12:34 PM #2
Cant you just fire a ghost projectile from the player, get the ghosts LVec. Then SetThingLook on the force projections?

(Cant you just fire a projectile as the force power and not worry about headpitch then?)

So you go:
Code:
player_look=FireProjectile(player, ghost, -1, -1, '0.0 0.0 0.0', '0.0 0.0 0.0', 1.0, 0x20, 30, 10);
final_vec = VectorSet(VectorX(GetThingLVec(force_projection)), VectorY(GetThingLVec(force_projection)), VectorZ(GetThingLVec(player_look)));

SetThingLook(force_projection, final_vec);


Is that what you were wanted?
Team Battle.
2003-01-26, 12:37 PM #3
SetThingJointAngle corrisponds to the joints in the things puppet file. If it doesn't have a puppet file it won't work at all.
-Hell Raiser
2003-01-26, 1:59 PM #4
The headpitch moves relative to the player using this method but its still off, it seems to get stuck at some point along the way. Its weird.
2003-01-26, 3:52 PM #5
Is it possible to post the whole code?
Team Battle.
2003-01-27, 4:26 AM #6
The only relatent piece of code is in a pulse and is:

SetThingJointAngle(projection, 2, GetThingJointAngle(player, 2));

I'm just using the +projection template. It seems to work fine except that the waist bend is off, the player can bend down further than the projection.
2003-01-27, 4:36 AM #7
Bah! I'm so stupid. The solution was right in front of me. Instead of just setting the torso joint angle, all I had to do was set all of the joint angles! Now the model matches headpitch perfectly.
2003-01-27, 12:14 PM #8
Gogo trial and error. [http://forums.massassi.net/html/redface.gif]
-Hell Raiser
2003-01-27, 1:19 PM #9
My way would have worked if you had used

SetThingJointAngle(projection, 2, final_vec);

But your way works, and is much simplier. Good job.

(I wish jk had SetThingJointAngle too)
Team Battle.

↑ Up to the top!