Defining an area just "off" a target

building the input controls for my game and I'm starting to put player combat together and have an idea to influence the way my player "hits" by using the mouse position. I already have part figured out, i can use the vertical axis to determine the height of an attack and play animations based on that, my improvised thirdperson handler allows my to set that up easily



what also want to do is define hits based on clicking points (just off/ next to) a target character, my idea is to have the player fire direct/straight/tight blows(jabs) when aiming directly at a character and expansive slugs and sweeps (uppercut/sucker punch) when clicking in an area close to the enemy (see pic). and this is where I need some advice, how do I define "just off". I want fights to be anything from "slick" boxing or martials arts to the "straight" brawl, but I don't want the player having to toggle a switch to do it.





And another question, which is somewhat related, how to define  perimeters and sectors (circle math) with the player at the origin. I want to create proximity(fighting) and area of influence(shooting)  that widen/tighten based on the vertical movement of the mouse. I think the orbit cam example in usercode can provide some clues, but any additional advice would be cool.







thanks in advance

anybody :? …um, maybe what askin got last in all the fluff I posted



so let me try again



what might be a good way to define "next to", I have two ideas


  1. I can define xy  "offsets"  based on the enemy xy position and use screen coordinates to determine if the mouse postion is within the offset  region an input action is trigger


  2. I could export or define pickable geoms that define the trigger zones (seems cumbersome)



    which is good or can I do something else







    as for the second part, I pretty much want to know how to define a circular area  arround my character…but now that I'm sitting here typing, I think, I'm looking at this all wrong… assessing the distance between the player and enemies checking against a  max distance value,  should give my perimeter…right :?



    as for a the sector :expressionless: :? , it the same deal as the perimeter, but how do i limit it to an angle



    hope I'm clearer

Hmm,…ok let me say I never did anything related but my first thoughts about it.



All of this sound for me like having mutlitple bounding boxes. One around each character. This first

one is not meant as the usal one but the one that is used for checking the distance if it is allowed for

fighting or not. I would do it like a normal setModelBounding(new BoundingBox()) updateModelBouding  but then maybe take the bouding at increase the radius…



Actaully I dont know about your model but I assume that you have a bone-driven-model!? You could add more bounding boxes to each bone (should be possible with ogre and HottBJ) So You would have any bone surronded by a bounding sphere.



Now in action I first would check if the first (increased) boudning spheres are colliding if yes bounding Pcik ray should be activated. If a (Bone)BoundingSphere is readched by the ray there is a hit…



Something like that…sound now that I wrote it ok but maybe there are some errors…! :smiley: Good luck! And I'm curious about some screenshots! What model-pipeline do you use?


ttrocha said:

Hmm,...ok let me say I never did anything related but my first thoughts about it.

All of this sound for me like having mutlitple bounding boxes. One around each character. This first
one is not meant as the usal one but the one that is used for checking the distance if it is allowed for
fighting or not. I would do it like a normal setModelBounding(new BoundingBox()) updateModelBouding   but then maybe take the bouding at increase the radius....

Actaully I dont know about your model but I assume that you have a bone-driven-model!? You could add more bounding boxes to each bone (should be possible with ogre and HottBJ) So You would have any bone surronded by a bounding sphere.

Now in action I first would check if the first (increased) boudning spheres are colliding if yes bounding Pcik ray should be activated. If a (Bone)BoundingSphere is readched by the ray there is a hit....

Something like that...sound now that I wrote it ok but maybe there are some errors...! :D Good luck! And I'm curious about some screenshots! What model-pipeline do you use?




I use the old md5 loader even in its ancient state, I think I can accomplish more with that(in theory for now), than with anything else that currently exists for jme, HottBJ included (no slight intended), still left be seen though, testing has only now begun ://, as for screenies hopefully by October I've now really begun to take this out of the boxes in spheres early prototype phase sadly :(