Jump to content

Recommended Posts

Posted

Title says most of it.

I want to know what part of model I hit with attack.

Since feature is for pvp, I don't really (for now) consider any other models than ModelBiped.

 

I'd like your opinion on how to do this without making core mod and/or manipulating too much vanilla.

 

I for one was considering using rayTrace (even client side) and check from which side and on what height the rayTrace vector hit the hitBox of my model.

Then compare rotation of hit entity and vector hitting it to check if e.g it was chest, shoulder or head.

Is this the only way? (because it WILL be very tricky to actually compute all that).

 

Before that (on 1.6.x) I was considering scaling players hitBox to minimum and spawning 6 other hitboxes that would be in arms/legs/chest/head place and would catch damage and transfer to player owner.

Yet in this case - that would mean I need +6 entites which might be laggy - also, I would need to rotate shit out of them to fit player's model/rotation.

 

Opinions? Helpful stuff (not even Java, maybe some article)?

 

EDIT - Before someone points out:

"I need +6 entites which might be laggy" - not "laggy", but the lag of movement - they might "wiggle" and not always fit model.

Also in 2nd idea - how would I remove/scale players hitBox?

1.7.10 is no longer supported by forge, you are on your own.

Posted

With regard to multiple hit boxes, most discussions on that topic have concluded that you can't expect them to be very exact. heck, even the main hitbox is not matched at all to the entity model.

 

To be exact you need to consider that the built-in hit box doesn't rotate, that there can be lag between server and client, and that you'd need a lot of math to get it exact.

 

I personally think you should just be happy figuring out if you hit the head (i.e. hit at certain height or above). Beyond that I'm not aware of many successful attempts at multiple small critical hit boxes.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.