How do I make something rotate towards where the right stick is pointing?
There are a few other posts about this and I haven't come across a clear solution. All I want is the Joystick Rotator back.
-
I think you can use the controller tool and hook something up to the right stick from there.
-
I don't think there's a particularly clean way of doing this right now, though I can see why something as specific as the joystick rotator would have been removed given that Dreams' toolkit is more generic.
I was doing something relatively similar yesterday, try this (for what it's worth, if there isn't one already I'll probably create a remixable chip that does this later):
You'll need a controller sensor, a tag, a calculator and a look at rotator.
The tag needs to be positioned at the centre of your object (remember the tag can be positioned separately to the tag gadget itself).
You then can use the calculator to add together the tag's transform and the right stick value. You may need to do some splitting/combining to make sure that the right stick X/Y axis are what you want.
You can then send this position into the look-at rotator. -
To follow up the below, there is a joystick rotator already in the Dreamiverse made by NeonTheCoder, so you might wanna try that. It's effectively what I was suggesting below in terms of logic. Seems to work well for rotating around the Y axis.
-
What I'm making is a tank. The center of the tank turret is where the to tag should go, correct? Does the position of anything else matter?
When I have the Scene Space Transform selected and added to the plain right stick data it spins by itself and doesn't seem to recognize the right stick input at all. -
Yeah, centre of the turret seems right.
I've quickly created a working example using the joystick rotator NeonTheCoder made, it should show up in your notifications I think. -
Heh, I've just realised that there is an easier approach, updated the joystick rotator example. The look at rotator can actually directly take a direction.
-
I don't think that I got anything in my notifications, but I don't think I was really even signed up for this yet. I hadn't created a password or anything until just a minute ago. Also, I don't see anywhere to input a direction. I feel so broken.
-
Hmm, maybe my bad, never used the collaboration stuff before. I've made it public, it's called 'Joystick Rotator Example', you should be able to find it in Dream Shaping.
The direction input on the look-at rotator is on the third tab, it's the last option.
Keep at it, you'll get there. -
Thank you so much Trench. I finally got it working. Neon's would have worked, too. I finally realize why everything was wrong. The X axis was backwards and it threw everything off. So frustrating that it was something so simple. You're solution is nicer looking as well though for what it's worth.
-
Oh, you're logic was a scene by the way and not a logic you can insert. I was just able to open it and copy and paste though. I don't know why I get any credit for it either. I certainly don't deserve it. You should definitely make it logic though and upload it. It's definitely helpful and easy to understand.
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.