![]() |
|
|
#1 |
|
Registered User
Join Date: Mar. 28th, 2005
Posts: 8
|
GetBoneCords()
How do I get the bone coordinates of a certain bone? I need to get the coordinates from the player's feet. I know how to get this if I were using the player mesh, but not if I am using a model without a bone.
example: Code:
var something lol;
local coords rofl;
rofl = GetBoneCoords('Bip01 L Foot');
lol = Spawn(class'classtospawn', self,, rofl.origin);
Am I going about this all wrong? |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Mar. 28th, 2005
Posts: 8
|
Let me try to explain this a little better:
I'm trying to attach the surfboard to the player's feet, and the particle emitter at the very end of the surfboard. Currently, the particle emits slightly above the surfboard, and the surfboard doesn't bind to the players feet. ![]() That's what it looks like when you get the right angle, but I want it to have the right angle 24/7. |
|
|
|
|
|
#3 |
|
quick question: where does the surfing/flying physics take place? in the surf board or in the player?
Most stuff that gets attached to anything else must have its collision variables modified. Take a look at the code in the pawn class (and inventory attachment class) for how third person weapon attachments are hooked up the player model. Also if there is no a bone to attach something to (as in the case of an actor that is rendered as a static mesh) you can use the 'setbase' function (http://udn.epicgames.com/Two/ActorFunctions#SetBase) after first placing the actor you want to attach in the correct position relative the actor it will be attached to.
__________________
"What do you mean it doesn't exist clientside?" Got a Pawn problem? Ask me about: Leaning, Prone, Limiting Strafing, Mantling, Dashing, Crouch Jumping, Using Cover, Parkour Moves My Generic Mods for UT2K4: Yet Another Real-life Mod: Class-based play, generic realistic weapons, unoriginal gameplay, w/ cheap COD4 knockoff ![]() TD Vehicles v124: HMMWV, MI4Hound, Black Hawk & AH-6 Helicopters, Motorcycle, IFAV Jeep, Abrams Tank * The only "truth" is what you can get away with * |
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: Mar. 28th, 2005
Posts: 8
|
The surfing physics takes place in the surfboard classes. Thanks for the help, I'm gonna check it out. =)
|
|
|
|
|
|
#5 |
|
So is the surfboard a subclass of vehicle? If so, you don't want to attach the surfboard to the player, you want to attach the player to the surfboard (there is a difference). There are several mods (Chaos Evolution and Colossians come to mind) that implement this type of vehicle. You may want to see how they went about doing it. But the basics will involve changing the KDriverEnter function to attach the player to the board (using setbase as opposed to attachtobone).
__________________
"What do you mean it doesn't exist clientside?" Got a Pawn problem? Ask me about: Leaning, Prone, Limiting Strafing, Mantling, Dashing, Crouch Jumping, Using Cover, Parkour Moves My Generic Mods for UT2K4: Yet Another Real-life Mod: Class-based play, generic realistic weapons, unoriginal gameplay, w/ cheap COD4 knockoff ![]() TD Vehicles v124: HMMWV, MI4Hound, Black Hawk & AH-6 Helicopters, Motorcycle, IFAV Jeep, Abrams Tank * The only "truth" is what you can get away with * |
|
|
|
|
|
|
#6 |
|
Registered User
Join Date: Mar. 28th, 2005
Posts: 8
|
It's not a vehicle, no.
|
|
|
|
|
|
#7 |
|
Registered User
Join Date: Mar. 28th, 2005
Posts: 8
|
Hmm, I'm pretty much lost here. I still can't figure out how to attach it to the player's bone. Only a certain vect, which I'm currently using (it doesn't work right, btw).
|
|
|
|
|
|
#8 |
|
I guess I should ask, since the board is not a vehicle, who actually does the movement and who follows. You said the physics takes place in the board, or is it that the board sets the controlling pawn's physics to something else, and the pawn does the actual movement(with the board following)? Also what class does the board derive from (this would be good to know to tell what its default properties might be)?
on another note, where exactly do you call attachtobone ? If the board attaches itself to the player then you could simply place a line of code like: Surferpawn.AttachToBone( self, 'The_FootBoneName_YouWant'); in the surfboard class. of course you need to set the rotation of the board as well (maybe by using SetRelativeRotation). As long as you know that a bone by that name exists in the player mesh skeleton, you should be OK.
__________________
"What do you mean it doesn't exist clientside?" Got a Pawn problem? Ask me about: Leaning, Prone, Limiting Strafing, Mantling, Dashing, Crouch Jumping, Using Cover, Parkour Moves My Generic Mods for UT2K4: Yet Another Real-life Mod: Class-based play, generic realistic weapons, unoriginal gameplay, w/ cheap COD4 knockoff ![]() TD Vehicles v124: HMMWV, MI4Hound, Black Hawk & AH-6 Helicopters, Motorcycle, IFAV Jeep, Abrams Tank * The only "truth" is what you can get away with * |
|
|
|
|
|
|
#9 |
|
Registered User
Join Date: Mar. 28th, 2005
Posts: 8
|
That still doesn't work. I still need to get the bone coordinates to update it.
![]() EDIT: Here, this is what I'm currently using rofl = Spawn(class'traileffect', self); rofl.SetBase(self); If I used getbonecoords, I could add var.origin to it, and it should snap. Otherwise, I'd have to add bones to my meshes, but I have no clue on how to do that. Last edited by mouserpg; 28th Mar 2005 at 06:57 PM. |
|
|
|
|
|
#10 | |
|
Quote:
__________________
"What do you mean it doesn't exist clientside?" Got a Pawn problem? Ask me about: Leaning, Prone, Limiting Strafing, Mantling, Dashing, Crouch Jumping, Using Cover, Parkour Moves My Generic Mods for UT2K4: Yet Another Real-life Mod: Class-based play, generic realistic weapons, unoriginal gameplay, w/ cheap COD4 knockoff ![]() TD Vehicles v124: HMMWV, MI4Hound, Black Hawk & AH-6 Helicopters, Motorcycle, IFAV Jeep, Abrams Tank * The only "truth" is what you can get away with * |
||
|
|
|
|
|
#11 |
|
Registered User
Join Date: Mar. 28th, 2005
Posts: 8
|
I tried logging it, but it showed up as: 0.0,0.0,0.0 every time. So it's not getting the coordinates of it.
EDIT: It doesn't spawn in the right location. But it does stay there. Right now I'm not using GetBoneCoords();. The trail emitter is directly above the surfboard, and it stays there no matter what. Last edited by mouserpg; 28th Mar 2005 at 07:02 PM. |
|
|
|
|
|
#12 | |
|
Quote:
Code:
local coords rofl;
rofl = Surferpawn.GetBoneCoords('Bip01 L Foot');
// or how about
rofl = Surferpawn.GetBoneCoords('lfoot');
[EDIT] You know I seem to recall that the naming conventions with spaces were not always accepted by some of the functions. Just to try all possibillities, instead of 'Bip01 L Foot' try 'lfoot' instead. lfoot is one of the attach aliases for the base UT2Kx skeletons ).
__________________
"What do you mean it doesn't exist clientside?" Got a Pawn problem? Ask me about: Leaning, Prone, Limiting Strafing, Mantling, Dashing, Crouch Jumping, Using Cover, Parkour Moves My Generic Mods for UT2K4: Yet Another Real-life Mod: Class-based play, generic realistic weapons, unoriginal gameplay, w/ cheap COD4 knockoff ![]() TD Vehicles v124: HMMWV, MI4Hound, Black Hawk & AH-6 Helicopters, Motorcycle, IFAV Jeep, Abrams Tank * The only "truth" is what you can get away with * Last edited by meowcat; 28th Mar 2005 at 07:56 PM. |
||
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|