2018-06-20 at 2:28 pm #5114
I wanted to make a way to move something left or right via html buttons. I made an animation of the object turning around to the right, then used a ‘pause animation’ puzzle to hold it still, and a ‘resume animation’ inside a ‘on mouse down’ puzzle and another ‘pause’ inside a ‘on mouse up’ puzzle. But there is no way to ‘resume backwards’ for the left turn. I can’t use a play because it starts at a set frame, and I’m not sure how the get the appropriate frame number to put in a variable, or how to handle a loop that starts somewhere other than frame 1.
To go left, do I just use an empty with the counter-rotating animation in the original file, parent the object to it, and then set up separate pause and resume steps for the ‘left turn’ button?
Is there an easier way or should I just set up nested empties if I want to add up and down?
2018-06-20 at 3:46 pm #5116
- This topic was modified 8 months ago by johngrigni.
Is it necessary to use animation, may be you can use Set Transform node if the movement of your object is straightforward? Then you can just use bottons to start moving it and then pause and then moving it backward.
Co-founder and lead graphics specialist at Soft8Soft.2018-06-20 at 4:18 pm #5117
The set transform node acts instantly, and I’m looking for something more subtle.
If I set the value down low, like 1 degree, do I then just loop it?
I tried setting up a loop while var=true setup, then use buttons to set the variable true or false, but it just seems to hang the system up.2018-06-20 at 5:03 pm #51182018-06-21 at 7:32 am #5121
Here is an image. It not only locks up that tab of my browser, but also the App Manager tab as well. This is in Safari on a Mac.
Better to use Do Every Frame puzzle instead of While. Look at my example.
Co-founder and lead graphics specialist at Soft8Soft.2018-06-21 at 11:22 am #5125
Next big question: Is there a way to use an objects local coordinates instead of global for such a transform? So if a car turns to the right, and I want it to go forward, not to the side, how do I do that?2018-06-21 at 12:00 pm #5126
I just noticed that the rotation does seem to keep local coordinates, but position doesn’t.2018-06-21 at 12:53 pm #5127
Aren’t you by any chance making an app where the user can move items on the scene (such as furniture)? I’m asking because we are going to release new puzzles for dragging objects with the mouse – which can come in handy if this is the case.2018-06-21 at 2:51 pm #5128
No, it started as a way to move the camera with icons, and became generalized. I might try to modify the WASD controller from the examples (minus the jump-space), but that involves coding, which by this point I’m sure you know I’m terrible with coding. I’m not even sure how I could use code from the examples in a new project.
But in any case, I could have it licked if I knew how to translate the global set position values to local for the object.
I’m thinking of making everything else pivot and move, and leaving the object and the parented camera stationary. But I have some objects with reflections from the world texture, and I’m not sure what that will do to it.2018-06-21 at 4:13 pm #5129
Yuri KovelenovStaff2018-06-22 at 12:38 am #5131
Thank you, and I am very much looking forward to the new improvements you mention!2018-07-12 at 6:40 pm #5679
I’ve downloaded 2.5, which is a very nice set of additions, thank you!
But, I still can’t get a local coordinate going with, for instance, a camera. If I rotate an empty with the camera parented to it, I can make it rotate left and right fine, but up and down is obviously using global coordinates, not local. Unless I start out pointing exactly along the Y axis, rotating along the X axis makes it corkscrew. I tried setting the coordinates in Blender to local but that has no effect.
Am I missing something? I’m usually missing something obvious. I’ve thought of a very clumsy ways around it, by rotating everything but the camera. Or setting a bunch of nesting empties with rotation animations and playing the animations. But I was hoping for something more elegant.2018-07-13 at 9:04 am #5690
Hi john, there’s no puzzle for local transforms, but it can be done with code and the “call JS function” puzzle.
I attached an example, where you can find functions called “moveLocal” and “rotateLocal” used in puzzles, they are defined in the local_transforms.js file in the “prepareExternalInterface” function.
Hope it helps!
Co-founder and lead developer at Soft8Soft.2018-07-13 at 11:21 am #5709
Thank you! The movement is a little jerky, but it should work.
You must be logged in to reply to this topic.