• 0

    posted a message on Ignoring Terrain (c_unitStateIgnoreTerrainZ)

    @Docablo: Go

    Yeah, I'm not sure about that because I have a semi-physics trigger that's setting my height every 0.0 game seconds, so that's definitely not the issue. I've used the TriggerDebugOutput function to verify that my unit's height is correctly set. The flag is being ignored, and my unit is hovering 8.0 above the ground, which is already 8.0 totaling an absolute height of 16.0. As soon as I move, it's corrected and my unit is standing on the ground again. As soon as I change the height again, it breaks. When I move, it fixes.

    To reiterate, I've tested my unit's height all points in the scenario I just described and it's always constantly at 8.0. The only thing that changes is whether or not it's relative to the terrain, which means the flag is being ignored in a certain case. That case seems to be any time I change my unit's height.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Ignoring Terrain (c_unitStateIgnoreTerrainZ)

    Hey all, I'm currently working on a project called Reaper Madness, which will be a third-person shooter wherein your reaper can jetpack over bumpy terrain and even cliffs at a steady height. I currently have this working, less than optimally, without setting my unit to ignore the terrain using the command:

    UnitSetState(EventUnit(), c_unitStateIgnoreTerrainZ, true);
    

    However, it would be much simpler and cleaner code if I could implement this UnitState. What I have found is that after setting this state, whenever I adjust the height of my unit, it acts as if this state were not set.

    For instance: The default world height on flat ground with no cliff is 8.0. My unit will start at 0.0 height relative to the ground, which means he's at an absolute value of 8.0. If I set the UnitState to ignore terrain and give him a height of 8.0, he will start at 8.0 height relative to the absolute bottom of the map, which is exactly the same positioning. I can move around, and my unit stays on the ground. However, if I change the height of my unit AFTER setting the ignoreTerrain state, my unit will be positioned relative to the terrain despite the state I've set. I've done many tests to verify that the unit's height and all other related variables are correct and it is in fact the state being ignored.

    Has anybody else dealt with this issue? If so, have you found a way around it or can we consider this a bug?

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.