I try to scale the arms down a little bit.
doesnt works too. I think my computer is too bad^^
Here the problem with the hierarchy I too get an empty scene. Where in the render is the node PandaNode weapon, but the weapon is factually exported to another egg - arms-shoot.egg. If you export one hand without weapons, then there is no problem.
The arms are working. But i cant see my weapon.
You get two files. There must be one. You need to combine weapons and hands into one grid. And only then to revive.
I must have an weapon file and an arm file and reparent both to the render?
It seems that our conversation can be long, I’m from Russia and do not speak English.
Arms and hands must be one mesh. You have it all separately, which leads to the export of two files. arms.egg and arms-shoot.egg with the correct approach should be one.
If you need two files, you need to export weapons and hands separately. Then you need to combine in the likeness of the demonstration samples, looking-and-gripping.
One time is better to show than to speak.
This is an example of how I will implement this idea. However, this approach requires the programming of a pistol by a special class of behavior. Shutter and trigger, as well as the flight of the flame can be done programmatically, it is not necessary to do this through animation.
#! /usr/bin/env python # -*- coding: utf_8 -*- import sys sys.dont_write_bytecode = True import math from direct.showbase import ShowBase as showBase from direct.actor.Actor import Actor class game(showBase.ShowBase): def __init__(self): showBase.ShowBase.__init__(self) base.disableMouse() self.brt = Actor("arms.egg") self.brt.actorInterval("shoot", playRate=2).loop() self.brt.reparentTo(self.render) camera.setPos(0, 12, 0) camera.setHpr(180, 0, 0) self.rightHand = self.brt.exposeJoint(None, 'modelRoot', 'r_IK') np = loader.loadModel("pistol.egg") np.setPos(-0.8, 5, -0.95) np.setHpr(180, 0, 90) np.setScale(0.7) np.reparentTo(self.rightHand) app = game() app.run()
Demo.zip (1.6 MB)
OH thanks man its working! That is what I want! Bye!
Can you please post the blender files of the pistol and the arms?
Note that the weapon model must be prepared before export, dividing all the moving parts into separate assemblies. This will regulate their management in the classroom. As it was initially, but I bundled everything into one geometry.
You can also look at the animation version, one thing you need to solve the issue with synchronization with hands.
I made a mistake in the code, indicating the extension of the model after the name. Correctly will not specify, this will save you from problems if you decide to change the format or compress.
Oh, yes. I think that wont be easy with the synchronisation of the animations.
Where are the cusors to move the models in the blend files?
I really suggested writing a class in python that will manage the shutter, trigger and other moving parts. But for this it is necessary to divide the model of the pistol into its constituent elements. They can also be animated, but I’m not a blender user, I prefer code.