Facepunch / garrysmod-issues

Garry's Mod issue tracker
142 stars 56 forks source link

keep upright #1469

Open Riftwalkerparanoia opened 10 years ago

Riftwalkerparanoia commented 10 years ago

When I use Keep UpRight it is suppose to constrain it from turning upside down so it will only rotate on the Y axis. But a problem in the coding limits it immensely. It will only rotate on its LOCAL Y axis instead of its global y axis. what this means is..

1

-If I where to select the keep up right option...

2

-It would only move on the Y axis which is illustrated in green.

-If I where to stand it up like this...

3

-and used Keep upright.

4

-The rotation has changed it's local rotation.

-I was wondering If one of the developers at face punch would ether change the coding in order to make it work on the Global constraint OR have an option that will let the user change the constrained axis of rotation.

-This would be immensely helpful.

-Thank you.

robotboy655 commented 10 years ago

Just lay down the prop and apply it then? It'd be counter-intuitive for it to force the angles to be always like on the first picture.

Riftwalkerparanoia commented 10 years ago

I need it at an that angel.

5

when spawned..^

6

the way I need it.^

If I where to lie it down 1st it would lock on the Y axis and it can't rotate. (if it didn't lock, there would be no point.)

7

it will not rotate on the X axis (RED) or the Z axis (BLUE) but will on the Y (GREEN) witch is intended in the 1st place BUT I was wondering if "one of the developers at face punch would ether change the coding in order to make it work on the Global constraint OR have an option that will let the user change the constrained axis of rotation."

robotboy655 commented 10 years ago

Ok, I see what you mean, I will see what I can do.

Riftwalkerparanoia commented 10 years ago

Thank you. sorry If I sounded like a jerk.

robotboy655 commented 9 years ago

Unfortunately I don't think this is possible to do, somebody will have to fiddle with this in the engine, and it ain't gonna be me because I suck at maths. Sorry.

robotboy655 commented 9 years ago

Ok, nevermind my previous post, I actually figured it out, the only problem right now is what if people expect the old behavior?

Kefta commented 8 years ago

@robotboy655 I personally expected it to snap up to the closest axis; I think this is an improvement.

robotboy655 commented 8 years ago

The problem is that it doesn't feel as stable as what it currently is, you can try it for yourself, the "fix" is commented out in autorun/properties/keep_upright.lua

thegrb93 commented 8 years ago

https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/game/server/phys_controller.cpp#L926

They're using the local z axis of the entity as the target upright. Angle isn't used. Also m_bDampAllRotation needs to be a keyfield and turned on to make it more stable.

thegrb93 commented 8 years ago

Changing it might break various maps though so idk :/

I always use a phys_ragdollconstraint instead anyway

robotboy655 commented 8 years ago

I will have to add a whole new constraint library function for this (for duplicator support), so it will most likely not make it into the next update.

Kefta commented 6 years ago

Will it make it into any update?