Jump to content

[Help] Entity Rotations not working


Ricy40

Recommended Posts

Hey!

I am having major issues trying to get my entity to rotate correctly.
It is a kind of squid entity but does not extend the squid class.

The way the entity works is it has an internal clock lasting 50 ticks.
ticks 1 - 10 it selects a move vector, and "rotates" to it
ticks 10 - 50 it shoots off in that direction and legs animate.

However, I've hit a huge roadblock in trying to get the entity to orientate correctly during the first 10 ticks.
I have tried things such as just setting the Y rotations to its current y rotation + 45deg, but it does not spin in a circle as you'd expect it just flickers left and right weirdly.
I cannot for the life of me figure this out and would really appreciate help from anyone who can.

My github:
https://github.com/Ricy40/Caerula/blob/master/src/main/java/com/ricy40/caerula/entity/custom/LulaEntity.java

You will probably want to pull it to investigate

My discord is Ricy40#3215 if you prefer to communicate there.

Link to comment
Share on other sites

On 6/5/2022 at 1:50 PM, Ricy40 said:

I have tried things such as just setting the Y rotations to its current y rotation + 45deg, but it does not spin in a circle as you'd expect it just flickers left and right weirdly.

Do you use a degree or radiant value for the rotation. based on the description of the problem I would say you use a degree value. you should try in this case a radiant value

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.