Jump to content

Why the eye-hight indicator at the collision-box does not move, if i change the value of the eye-hight?


Drachenbauer

Recommended Posts

Hello

 

I try to set ithe EyeHeight for my eintties.

And if i use F3+B to show the collision-boxes of my entities, it always shows the red square and the blue beam just a little bit below the top of the collision-box.

 

It seams like, it is not, where my code places the EyeHeight of the entity.

For sample:

    @Override
    public float getEyeHeight(Pose pose)
    {
        return this.getSize(pose).height * 0.5f;
    }

I´m pretty sure, this will place the EyeHeight in the middle of the collision-box-hight (for most of my Angry Birds characters, this is where the eyes are located on the texture),

But the red square is not located in this hight.

Why this happens?

Link to comment
Share on other sites

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.