Hello,
So I noticed a while back that the holoAnim extension had E2 functions for pose parameters, and I decided to try and make a model that uses them. I got halfway through making it work when I discovered a very strange problem; it seems that the holoSetPose()
function can only affect one pose parameter at a time.
A more technical way of describing the problem is that when holoSetPose()
is used to set a pose parameter, all other pose parameters appear to reset to their "zero" position.
At first I thought it was a problem with just my model, so I did a test using the HL2 Jeep/buggy model, which uses pose parameters to move the wheels up and down (among other things).
This is the test E2 I made, as you can see it's pretty simple.
@name Pose Parameter Test
@inputs Left Right
@outputs
@persist
@trigger
if(first()){
holoCreate(0,entity():pos(),vec(1),entity():angles(),vec(255),"models/buggy.mdl")
}
holoSetPose(0,"vehicle_wheel_fl_height",Left)
holoSetPose(0,"vehicle_wheel_fr_height",Right)
Controlling the first pose parameter works fine. This is what happens when I lowered the first wheel:
![First Pose Parameter alt text](https://camo.githubusercontent.com/625febaf2b02f00051c0e23e6ace795b68462f3238aeafcb1c4f97d259a9b40f/68747470733a2f2f692e696d6775722e636f6d2f6b39484a6366722e6a7067)
This is what happens when I try the other one independently:
![Second Pose Parameter alt text](https://camo.githubusercontent.com/8d27df28ffa6ea95505ac81365b2c1ce814395d8f4439f775e4848aad69ffb77/68747470733a2f2f692e696d6775722e636f6d2f43624d6f77344f2e6a7067)
This is where the bug occurs. Setting the First, then the Second, does this:
![Both at once alt text](https://camo.githubusercontent.com/c9fcf23c830eec108365864bbec66797f31a08bd72fec308595fb0de0c16a1da/68747470733a2f2f692e696d6775722e636f6d2f636b6d556e66642e6a7067)
When the sequence is reversed, the same thing happens, but it affects the other wheel:
![Reversed Sequence alt text](https://camo.githubusercontent.com/45eca60cc59fc9da33a9e9e048018626b72a4e4fbc6661a65a37d08d6de6204f/68747470733a2f2f692e696d6775722e636f6d2f707973616432362e6a7067)
Examining the model in HLMV shows both wheels being controllable at the same time; This only makes sense as both source vehicles and certain addons such as Simfphys use all necessary pose parameters to make their vehicles work.
![HLMV alt text](https://camo.githubusercontent.com/c9a870d39fdc1269893b1fb228b30e4b5d0abfa588695807dc70679e34930da2/68747470733a2f2f692e696d6775722e636f6d2f6372757a6a4c6a2e6a7067)
I have not tested holoGetPose()
to see if it correctly retrieves the pose parameter info.
Thanks for your time and attention, and please let me know if you need any more information relating to the issue.