lfnetwork.com mark read register faq members calendar

 Thread: Why can't bone angles be adjusted by value of variables?? Thread Tools Display Modes
 07-20-2006, 04:32 PM #1 Vruki Salet @Vruki Salet Junior Member     Join Date: Aug 2005 Location: Somewhere else entirely Posts: 443 Why can't bone angles be adjusted by value of variables?? I'm messing with setting bone angles in BG_G2PlayerAngles and a weird thing happens. This doesn't work: Code: ```static vec3_t rhangAngle; float p = 20.0f; VectorCopy(vec3_origin, rhangAngle); rhangAngle[PITCH] += p; --snip irrelevant if(){} for being in a vehicle-- strap_G2API_SetBoneAngles(ghoul2, 0, "rhang_tag_bone", rhangAngle, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time);``` This does: Code: ```static vec3_t rhangAngle; float p = 20.0f; VectorCopy(vec3_origin, rhangAngle); rhangAngle[PITCH] += 20.0f; --snip irrelevant if(){} for being in a vehicle-- strap_G2API_SetBoneAngles(ghoul2, 0, "rhang_tag_bone", rhangAngle, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time);``` See the only difference is in the first I added "p" (float value of 20.0) to rhangAngle[PITCH] and in the second I just added a float of 20.0 directly. What gives? you may: quote & reply,
 07-21-2006, 12:42 AM #2 Vruki Salet @Vruki Salet Junior Member     Join Date: Aug 2005 Location: Somewhere else entirely Posts: 443 It turns out it was a problem involving the split between game and cgame and a failure of communication between them leading to my seeing something onscreen other that what the game was actually doing. Anyone trying to deal with similar stuff is welcome to get in touch with me. you may: quote & reply,
 07-21-2006, 03:13 PM #3 razorace @razorace Impressive, Terran!     Join Date: May 2002 Posts: 9,198 Yeah, getting both the cgame and game to work together is tricky for some of this stuff Good luck! ---Jedi Guardian of the Newbie Questions ---Masters of the Force Team Leader / Creator ---Open Jedi Project Lead Moderator / Co-Founder you may: quote & reply,
 07-21-2006, 05:28 PM #4 Vruki Salet @Vruki Salet Junior Member     Join Date: Aug 2005 Location: Somewhere else entirely Posts: 443 Thanks I got it. I was sending the playerstate data to s in the wrong place or wrong way but it works now. It sure is tricky because it's hard to know if what you do doesn't work at all or if it works on the server but doesn't show on the client. you may: quote & reply,
 07-26-2006, 03:34 PM #5 ensiform @ensiform The Stig     Join Date: Nov 2004 Location: Sawtooth Cauldron Posts: 1,241 Current Game: Borderlands 2 whats the difference between strap_G2API_SetBoneAngles and trap_G2API_SetBoneAngles ? iojamp project lead / coder you may: quote & reply,
 07-26-2006, 05:01 PM #6 Vruki Salet @Vruki Salet Junior Member     Join Date: Aug 2005 Location: Somewhere else entirely Posts: 443 You tell me, heh. It looks like all those strap_ commands just return equivalent trap_'s. It says they're "shared" but i see that the plain trap_'s are used in cgame and game so...? The reason client wasn't showing my changes was because the variable p was set just to 20.0f in game so cgame thought it was 0, while of course an actual number had its own real value whereever it was. I was just setting angles directly in BG_G2PlayerAngles, not with traps. (No it wasn't obvious at first, i'm still taking baby steps here.) If you like to try wacky stuff with bone angles, check out the IK stuff in the game. You can sort of retroactively set bone angles to make a particular point on the body try to reach a given point in the game world. Restraining the joints to natural looking positions is hard though. you may: quote & reply,
 07-26-2006, 11:12 PM #7 razorace @razorace Impressive, Terran!     Join Date: May 2002 Posts: 9,198 Yep, that's the key reason why realistic IK is so difficult to pull off. ---Jedi Guardian of the Newbie Questions ---Masters of the Force Team Leader / Creator ---Open Jedi Project Lead Moderator / Co-Founder you may: quote & reply,
 LucasForums > Why can't bone angles be adjusted by value of variables??

 Thread Tools Display Modes Hybrid Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home -------------------- Network     Star Wars Gamer     Knights of the Old Republic     Mixnmojo.com     Monkey Island Discussion     Brutal Legend Discussion     Grim Fandango Discussion     Psychonauts Discussion at Razputin's Domain     Sam And Max.Net     The Dig Museum     Full Throttle Discussion     IndyJones.net     Fracture     Forum Help & Feedback Center     LucasForums Archive         LEGO Star Wars series         Star Wars         Star Wars: Battlefront series         Star Wars: Classic Gaming         Star Wars: Empire At War         Star Wars: The Force Unleashed series         Star Wars: Galaxies         Star Wars: Jedi Knight series         Star Wars: The Old Republic         Star Wars: Republic Commando         Star Wars: Rogue Squadron series         Star Wars: X-Wing series

 Contact Us - LucasForums.com - Archive - Privacy Statement - Top

All times are GMT -4. The time now is 06:33 PM.