Jump to content

Changing entity model when moving


Lunatic_Cat

Recommended Posts

Combine the two models into a single model. Create some parameter that checks whether the entity is moving. A simple DataParameter<Boolean> should do the trick nicely. You could also check the velocity of the entity depending on if the entity Set the value to true whenever the entity is moving and false when it is not. Override preRenderCallBack in your EntityRenderer and have your ModelRenderer#showModel value switch whenever the player is moving or not. You should probably keep a cached value inside the renderer so that you do not call the change every frame as that would be redundant.

  • Thanks 1
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.