Skip to main content

Report this content

We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.

Note that misuse of the reporting tool will not be tolerated.

Item being reported:

A forum post by Puntolory

This was incredibly difficult to explain, and I'm fairly sure I really didn't do it well even with this draft, so sorry about that. If you can't understand what I'm trying to say here, let me know!

I've spent quite a few days trying to create a turret that rotates around a pivot (provided by a ball joint) with standard/advanced rotators controlled by the player with the DS4 analogue sticks. The plan was to have a camera grouped with the moving part of the turret, so that when possessed (or controlled via logic in the scene) the camera would jump to its position beside the turret and the player would be able to control it as if it were a weapon in a FPS game, but to be clear my problem would still be there even if we didn't take the camera in consideration.

To make a good turret, I want to make the turret (its moving part) rotate in only two of its local space axises. Specifically, I want to let it yaw and pitch, but not roll, which means that I want the turret to aim around while keeping the relative angle of its body fixed to where it's aiming at, instead of letting it rotate around it. Since I can't really explain it properly, think of the movement of a rifle in a FPS game and how it moves in the 3D space.

I've tried various methods but never managed to achieve this: the turret will inevitably roll and its position will mess the turret's visual look (it will look like I'm aiming it sideways) and, since its grouped with it, the player's camera view.

Advanced rotators's dampening does not appear to work (I believe this is a known problem) so I can't use them to stop the turret from rolling, and they also tend to act wildly when used with ball joints (an advanced rotator with a single axis rotation active will make my turret move in all directions for some reason). I get better results with multiple standard rotators, two used for yaw and pitch and one set to 0 speed with full strength and dampening to stop the rolling, but the problem is that while moving the turret attached to the parent with a ball joint will inevitably roll a little due to the restrain, and the angle will keep accumulating until the turret is completely upside down.

Changing the ball joint's strength only makes the rotation slower, and locking the rotation will only stop the turret from going upside down: it will go wild once it reaches the edge of the ball joint's 3D angle, and the roll will still happen in other positions while rotating.

I've tried to think of possible solutions, like using 'look-at' rotators or trying to set up a stabilizing system with multiple rotators set to the roll axis and an angle sensor controlling them, but I'm not sure if any of them can work for what I'm trying to do. If you have any ideas, I'd be happy to hear them. Thank you!

Oh dear! Your browser is either unsupported or there has been a problem loading the page.