TemplePlus
TemplePlus copied to clipboard
Targeting boxes are very tall
When my party are in close quarters, I sometimes find it hard to move them about since my mouse click would rather select another party member than activate a move to a new position. E.g. in front of the top door at the ground level of the mouthouse. It was very hard placing party members, as many would be south of where I was trying to move them to.
It seems to differ slightly from character to character? E.g. my current sorceress seems to have a very large (i.e. "tall" in isometric view) selection box. Maybe it's just coincidence from other factors.
I'm not familiar with the temple plus codebase, so haven't had a look if I can fix it myself. If someone can point me to where to look I may take a crack at seeing if there is a bug at all or any possible fix.
I think it's based on a cylindrical hitbox. You can turn on display of the cylinders through the console rendering debug menu. (drawObjCylinders) IIRC the cursor acquires targets via the raycast function, which is a huge and messy affair. It probably uses the cylinders though.
Yeah the target selection is weeeeeeeird. There are essentially three different ways of "hittesting" objects in ToEE:
- By Circle, which uses the "radius" property of the object and corresponds to the selection circle you can see below the characters feet.
- By Cylinder, which uses the "radius" and "renderHeight" properties to hit-test against a cylinder around the object.
- By actual hit-test against the 3D model.
I actually recently fixed a bug that caused us to hit-test below the actual position of the mouse cursor. It was unclear to me whether we inherited this bug from ToEE proper, or whether we introduced it in the first place though.
If you want to look at the actual code for this, check TemplePlus\raycast.cpp
, and especially the "PickObjectOnScreen" function in there.
You'll see that callers of that function can specify which type of hit-testing they'd like to use using the flags (GRF_HITTEST_*).
To see the cylinders in-game, press F10 for the debug menu, and activate this option:
This will enable rendering of the cylinder:
I found it was only for one of my characters - all the others have perfectly fine targeting cylidners. For some reason hers is slightly taller than the screen.
Than the screen? As in the entire viewport? What race is she? And what's her height?
Yes. If she is at the bottom of my screen (i.e. just "above" their portraits) and I hover over her, I can just see the bottom of her overview card at the top of the screen.
She's a human sorceress, with the standard height (don't remember the height, but I remember not adjusting height for any characters in my party). No other party members (human or otherwise) have thir behaviour.
It's curious how much varies from character to character. The auto-equip sets work fine for my elven ranger, but not at all for my hafling rogue :S
- Dan
Ah, i think that's a bug that updates the render height with wrong values. I've seen it reported before but it was hard to debug, maybe @shartte will have more luck with the latest anim system overhaul.
@Dan-True Can you try enabling the debug-view shown above and post a screenshot of your affected character's cylinder?
Hm, my debug menu looks completely different. Pressing F10 give sme this:
You need the dev version... you can grab it from appveyor (linked from the repo front page).