I have two animated objects
Soldier and weapon
Animations are already created, but there is a problem, the weapon is not in the hands of a soldier.
How do you move the weapon along with its entire animation? So that I don't have to edit the whole animation frame by frame
It looks more or less like the picture, as you can see the pickaxe is lower than the hand
Set the 3D cursor to objects origin
Now add a new empty to the scene, it should be added at the objects origin
Parent the object to empty
Now move the empty to the desired location and the whole animation will be moved as well
idk how to add new empty to the scene.
I'm trying to do like that:
On. 3D view -> pose mode -> 3d cursor
what next?
Related
When I right click, I can move my camera up and down. By default, when my model loads, half of its body is out of the frame. I want to move the camera down, so the whole body fits in the frame. Is there a setting to do this? I’ve tried using camera position but that didn’t work. Thank you!
when I come across cases like this I do this:
try to scale down the object first, so that I can see the whole picture
add axesHelpers to object or scene, to figure out which direction should I move to
change position of camera accordingly.
I have a simple side-scrolling platformer where the player is a ball, and I want him to rotate as he moves to look like he is rolling.
However, I have a 2D Camera set up so the player is at the bottom center of the screen. I want the player to stay there, but when I move the player the camera moves in circles along with the player.
How can I stop the camera from moving around?
A few options come to mind:
Presumably the player character is a PhysicsBody2D (e.g. a KinematicBody2D) with a Sprite or similar. And the Camera2D is a child of the PhysicsBody2D. Well, rotate the Sprite. That way the rotation does not affect the Camera2D. Of course, if the rotation is driven by physics, then this option isn't helpful.
Well, there is no reason to make the Camera2D be a child of your PhysicsBody2D to make it follow it. Instead, you can use a RemoteTransform2D that pushes its position (with update_position = true), but not its rotation (with update_rotation = false) to another Node2D. And then you make your Camera2D a child that another Node2D.
Let us say you don't want to have something as child of your character PhysicsBody2D at all. In that case, you can try a PinJoint2D. Set your node_a to the character PhysicsBody2D, and your node_b to some RigidBody2D, and then the Camera2D can be a child of the RigidBody2D.
Or you can solve it with a script. You can add a Node2D and on its _physics_process you have it copy the global_position of your character to its own global_position, so that it follows it. Then make the Camera2D a child of the Node2D.
As a precision I already noticed threads about this but didn't find a way to achieve exactly what I need.
Basicaly I have a board of objects that I need remaining always on top of everything but also attached to the camera.
I first tried to add the group to the camera and it stayed as wished always in the viewport. But in this configuration the group of objects still be a part of the scene so while zooming to regular objects in the "editor" the board goes into/among these objects of the scene.
My second trial was based on this thread and work wonderfully in order to get all of the board objects rendered above everything. But on such a configuration when rotating around the axis (with orbit control) both scenes rotates. So I tried to update the foreground scene with coordinates of the camera but the update was not immediate and this scene is flickering (I suppose that while rotating the update function is not called immediately).
My best wish would have been to "attach" the foreground scene to the camera so that it would stay on top and sticked on the screen/viewport but I don't even know if it is possible and how to do that (as only groups of objects seem to be capable to be attached to the camera).
I am really stuck on that point. Thanks you for any help!
If this is what you need,
just set object.material.depthTest = false; and object.renderOrder = 1000; for all objects you need to be always on top and attached to the camera.
I want to animate an object A so that, when it's certain distance from object, B it gets on top of B and does it's animation. I recorded key frames but animation is always played at initial location (where it was recorded originally) in other words I want animation to be depended on player's position not worlds position.
So how can I make a location depended animation?
Thanks!
create an empty parent object for the game object you wish to animate and move the parent instead then the object will animate relative to the parent
I have just started to learn Unity 3D. I am using this as first lesson. I created a terrain, added texture, plants and grasses, added first person controller and directional lighting. When I press play, the scene automatically starts moving along Y direction. I want the scene to move only when i give input using keyboard or mouse. How to achieve this ?
The first person controller has to be placed above the terrain completely. After doing this I get the desired effect.