Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi guys,

 

I have a fish model that is scaled down to 0.10F in its render class as follow ... the scale end up fine.

 

@Override
    protected void preRenderCallback(EntityLivingBase par1EntityLivingBase, float par2)
    {
        this.scaleFish((EntityClownFish)par1EntityLivingBase, par2);
    }
    
    protected void scaleFish(EntityClownFish par1, float par2)
    {
    	float scale = (float)par1.GetRenderValueFromSize();
        GL11.glScalef(scale, scale, scale);
    }

 

BUT as soon as I am trying to set the collision box smaller than setsize(0.5F,0.5F), the fish is thrown to the ground and die after few seconds.

 

In the following picture, I set it to setsize(0.3F,0.3F) ... this is the result. But like I said, if I set it to 0.5F,0.5F it is fine ... but the box is too big. Am I missing something? Is it because I scaled down the model too much?

 

 

 

 

 

 

 

setsize.png

It has nothing to do with your render scaling. There is no real interaction between bounding box and rendered model.

 

There may well be a limit on how small the bounding box can be. There certainly is limit to how big you can make it. The thing is that the bounding box is used for path-finding and to make the path-finding code efficient they can't allow too extreme of size and also don't rotate the bounding box and lastly make the X and Z to always be same.

 

So there is probably some pathfinding that is messing up and then moving the entity.

 

Anyway, you should test whether it is the height or the width of the bounding box that is causing the problem. Because in worst case you can at least make some of the dimensions match more closely.

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

  • Author

It has nothing to do with your render scaling. There is no real interaction between bounding box and rendered model.

 

There may well be a limit on how small the bounding box can be. There certainly is limit to how big you can make it. The thing is that the bounding box is used for path-finding and to make the path-finding code efficient they can't allow too extreme of size and also don't rotate the bounding box and lastly make the X and Z to always be same.

 

So there is probably some pathfinding that is messing up and then moving the entity.

 

Anyway, you should test whether it is the height or the width of the bounding box that is causing the problem. Because in worst case you can at least make some of the dimensions match more closely.

 

Actually the issue is at the height level. Width is fine in any sizes. Also, the model render is very jumpy (up and down) when I put the size smaller than 0.80.  At 0.80 everything is fine. At 0.79 ...I am starting to see many up/down shake and bubbles (the particle effect ... no clue why).

 

setSize drives me nuts. ;)

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.