Xcode spritekit scene editor with node - xcode

I want to add a physics body to a node in the scene edit by spritekit editor, any one can show me how?
ps: I can add physics body to a sprite, it works fine, but to node, code is the only works way by now.

I don't think you can via the Scene Editor but I am not sure why you can't, given the SKPhysicsBody is a property of SKNode and not SKSpriteNode.
You could try:
Creating a sprite with a transparent texture.
Doing it in code.
The scene editor is very lacking and in my game I am seriously considering writing a custom editor to overcome the limitations.

Related

SceneKit bone animation

I'm new to SceneKit and trying to make a basic scene in the scene editor. I don't have any code written because I'm trying to do this all visually for now.
I have a tree that I made in Blender, and it has bones in it. I made a new scene and set the tree physics to dynamic and added a turbulence field, but the bones don't seem to do anything even with the turbulence field added.
Can someone point me in the right direction? All I'm trying to do is make the tree blow with the wind.
Here's a screenshot of the editor, I can provide the DAE file if needed.

What is the better form to animate on Unity 3D?

I would like animate a object similar 3D sequence diagram using Unity 3D. I donĀ“t know what is better form to animate, if Animation or Animator...
So, I do a preview on Power Point https://youtu.be/tgfPIT47xGY
Animation vs Animator:
The Animation component is an old component used for animation in our legacy animation system. It remains in Unity for backwards compatibility but you should not use it for new projects. Use the up-to-date Animator component instead. SOURCE
Use the Animation Editor View for this.
To animate Game Objects in Unity, the object or objects need an Animator Component attached. This Animator Component must reference an Animator Controller, which in turn contains references to one or more Animation Clips.
When using the Animation View to begin animating a GameObject in Unity, these items will be automatically created, attached and set-up for you. SOURCE
Though slumtrimpet is obviously right, I can't see why you might need animations to create something like the video you shown. Why don't just use sequential instantiates with the help of coroutines or simple timers?

Unity Animation not working on different scene

I'm working on a menu scene where the options come down from top, so I tried to use Unity simple Animator. The problem is the animation won't work. The weird part is, when I tried the same thing on my game scene the animation works.
-I've checked that the animation is attached to the object
-Culling type is Always Animate
-I've also added a script and tried to force the animation with no results.
Why doesn't the animation not working anything other than the main scene? Do I need to trigger something for it to work?
Things you could check:
Make sure you are using the same kind of component in both scenes. Animator is different from Animation.
If you have an Animator component make sure you have an the right Animation Controller attached to it.
If you have an Animation component make sure that the Animation field is set and holds your animation file and Animations is set too and holds the list of possible animations of your (UI) object.
Even though they have the same extension, .anim files created when an Animation component is attached are different from .anim files created when an Animator component is attached so if you try to play an Animator .anim it won't play with an Animation component.
Is your Animation set to play automatically? If not, are you giving the animation.Play() command somewhere in your code?

animation not playing unity

This appears to be such a common problem, that finding answer to my specific case is near impossible, because of the amount of noise in google or forum searches.
I have imported object to unity from blender. This objects had smaller objects inside it. Those smaller objects have animation on them, which was created in unity. If I open the animation window (Window->Animation) and press play - I can see correct movement of an object. Animation is set to play automatically in inspector, culling type is always animate. If I play the game however, animation does not play. Why?
add the animation to the main object, then animate the smaller object...
you have to put animation component to main object, then animate the small part...
it is important...
it should work
I Could not find any unity inspector based answer. For now, the best option I have is to create new script, and in update() check if the animation is playing. If not, play it. Very inefficient, so to whoever might stumble upon this post in the future, I suggest you try to add this.animation.play() in setting up part of the script.
I know it's kinda late, but this is for others having this same issue.
Animations in Unity have types (2 of which I know).
Type 1 can be attached to an object using the Animation Component.
Type 2 can only be used in Animators (Mechanim).
Animations imported with FBX files are type 2 (and as far as I know, animation type in FBX files can NOT be changed), so they will usually not work when attached directly to an object with "Animation". They should be used with Animators and Animator Controllers. Just create a New Controller and add the animation. It will become the default animation state and play automatically.
If you want it to loop, click on the FBX asset, and in the Animation tab, choose Loop Time and click Apply.

Best way to animate a circle moving around a screen in Qt?

If I wanted to, using Qt, simply have some circles move around in a white box, or a graphic, what would be the best method of this?
Would I need to draw white/the graphic behind where the circle moved from every time? Is there a simple way of accomplishing this in Qt?
Create QGraphicsView object to your widget and added a QGraphicsScene to view.
Add a QGraphicsEllipseItem to scene
Use QPropertyAnimation to change the "pos" property of the ellipse item.
If you need more advanced features, you can build your own animation class on QPropertyAnimation.
enjoy it:)
Update: You can read Qt's Next Generation UI for more information.
Subclass a QWidget. Start a timerEvent() to animate the positions of the circles, then call update() at the end to schedule a repaint of the widget. Override the widget's paintEvent() - in there you draw your background and circles, using a QPainter object. The Qt Assistant has examples of how to use QPainter.
Qt also has a new animation framework that may facilitate something like this, but I have not looked into it.

Resources