-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add model pitch and roll and add API #2251
Comments
We already have a function to set the pitch: int ObjectRef::l_set_look_pitch(lua_State *L) https://github.com/minetest/minetest/blob/master/src/script/lua_api/l_object.cpp#L759 But that doesn't work with Lua entities, there's no variable for that: |
That's look pitch, not model rotation pitch |
Because model rotation pitch has not been added yet. |
Oh, that's what I meant. I'm changing the title... |
Automatic pitch movement like we have with yaw would also be nice to have as an option. |
That would be excellent for flying units, although the trigonometry involved might get complicated. |
Half issue is using set_bone_position() - model need have bone of course. |
Related to #1800 |
👍 I also want this. It's an obvious missing feature of entities. Yaw, pitch and roll should be all settable for entities. It's annoying that you can only rotate entities around one axis, this is too limiting. Some use cases:
|
See experiments in #7323 Thread has good discussion but was a duplicate. |
#7395 merged. |
Issue type
Add
setpitch(radians)
andsetroll(radians)
and the corresponding getters.We already have
get/setyaw(radians)
to rotate the model visually. Why notget/setpitch(radians)
andget/setroll(radians)
too? This gives us complete control on model rotation.One use case is for spiders that crawl walls and ceilings. The can rotate upside-down or sideways so that they look like they're actually crawling on walls and ceilings.
Another simpler use case is flying entities (arrows rotating in line with their trajectory, bats flying around).
(Wow. It's been 3 years. Updated description to be more accurate.)
The text was updated successfully, but these errors were encountered: